/* Reset & Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f5f5;
    color: #333;
    line-height: 1.6;
}

/* Dashboard Layout */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    padding: 20px;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
}

.sidebar-header {
    text-align: center;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    margin-bottom: 5px;
    color: #fff;
}

.sidebar-header p {
    font-size: 12px;
    color: #bdc3c7;
}

.user-info {
    display: flex;
    align-items: center;
    margin-bottom: 30px;
    padding: 15px;
    background: rgba(255,255,255,0.1);
    border-radius: 10px;
}

.avatar {
    font-size: 40px;
    margin-right: 15px;
}

.user-details h4 {
    font-size: 16px;
    margin-bottom: 5px;
}

.badge {
    display: inline-block;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 11px;
    font-weight: bold;
    text-transform: uppercase;
}

.badge-attendance {
    background: #2196F3;
    color: white;
}

.badge-gifts {
    background: #4CAF50;
    color: white;
}

.badge-management {
    background: #9C27B0;
    color: white;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.sidebar-nav a {
    color: #bdc3c7;
    text-decoration: none;
    padding: 12px 15px;
    border-radius: 8px;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-nav a:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.sidebar-nav a.active {
    background: #28245f;
    color: white;
}

.sidebar-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid rgba(255,255,255,0.1);
    font-size: 12px;
}

.date-time, .event-day {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
    color: #bdc3c7;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 250px;
    padding: 20px;
    background: #f5f5f5;
}

.main-header {
    background: white;
    padding: 20px;
    border-radius: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.main-header h1 {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-size: 24px;
    /* color: #2c3e50; */
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-actions {
    display: flex;
    gap: 10px;
}

/* Dashboard Stats */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-5px);
}

.stat-card-wide {
    grid-column: span 2;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-content h3 {
    font-size: 32px;
    color: #2c3e50;
    margin-bottom: 5px;
}

.stat-content p {
    color: #7f8c8d;
    font-size: 14px;
}

.slot-breakdown {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-top: 10px;
}

.slot-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px;
    background: #f8f9fa;
    border-radius: 6px;
}

.slot-color {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.slot-name {
    flex: 1;
    font-weight: 500;
}

.slot-stats {
    font-weight: bold;
    color: #2c3e50;
}

/* Search Section */
.search-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.search-card h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.search-form {
    display: flex;
    gap: 10px;
}

.search-form input {
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-form input:focus {
    border-color: #28245f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Buttons */
.btn {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
}

.btn-primary {
    background: #28245f;
    color: white;
}

.btn-primary:hover {
    background: #1c1a47;
    transform: translateY(-2px);
}

.btn-success {
    background: #4CAF50;
    color: white;
}

.btn-success:hover {
    background: #45a049;
    transform: translateY(-2px);
}

.btn-danger {
    background: #e74c3c;
    color: white;
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
}

.btn-refresh {
    background: #f8f9fa;
    color: #2c3e50;
    border: 1px solid #dee2e6;
}

.btn-refresh:hover {
    background: #e9ecef;
}

/* Result Section */
.result-section {
    background: white;
    border-radius: 15px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.result-card {
    padding: 20px;
}

.student-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #eee;
}

.student-header h3 {
    color: #2c3e50;
}

.slot-badge {
    padding: 5px 20px;
    border-radius: 20px;
    font-size: 18px;
    font-weight: bold;
}

.student-info {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.info-row {
    display: flex;
    align-items: center;
    padding: 8px 0;
}

.info-label {
    width: 150px;
    font-weight: 600;
    color: #7f8c8d;
}

.info-value {
    flex: 1;
}

.text-muted {
    color: #95a5a6;
    font-size: 12px;
    margin-left: 10px;
}

.action-buttons {
    margin-top: 20px;
    padding-top: 20px;
    border-top: 1px solid #eee;
    display: flex;
    gap: 10px;
}

/* Activity Section */
.activity-section {
    background: white;
    border-radius: 15px;
    padding: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.activity-section h3 {
    margin-bottom: 15px;
    color: #2c3e50;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    padding: 12px;
    background: #f8f9fa;
    border-radius: 8px;
    border-left: 4px solid #28245f;
}

.activity-icon {
    color: #28245f;
    font-size: 18px;
    margin-top: 2px;
}

.activity-content p {
    margin-bottom: 5px;
}

.activity-content small {
    color: #7f8c8d;
    font-size: 12px;
}

/* Badges */
.badge-success {
    background: #4CAF50;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-warning {
    background: #FF9800;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

.badge-danger {
    background: #e74c3c;
    color: white;
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 12px;
}

/* Responsive Design */
@media (max-width: 992px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
    }
    
    .dashboard-stats {
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    }
}

@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        padding: 15px;
    }
    
    .main-content {
        margin-left: 0;
        padding: 15px;
    }
    
    .dashboard-stats {
        grid-template-columns: 1fr;
    }
    
    .stat-card-wide {
        grid-column: 1;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .header-actions {
        flex-direction: column;
        gap: 5px;
    }
}

@media (max-width: 480px) {
    .info-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 5px;
    }
    
    .info-label {
        width: 100%;
    }
    
    .student-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 10px;
    }
    
    .action-buttons {
        flex-direction: column;
    }
    
    .btn {
        width: 100%;
        justify-content: center;
    }
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes slideIn {
    from { transform: translateX(-20px); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.fade-in {
    animation: fadeIn 0.5s ease;
}

.slide-in {
    animation: slideIn 0.3s ease;
}

/* Message Styles */
.message-container {
    margin-bottom: 20px;
}

.message {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 10px;
    animation: slideInDown 0.3s ease;
    border-left: 4px solid;
}

.message-success {
    background: #d4edda;
    border-color: #4CAF50;
    color: #155724;
}

.message-error {
    background: #f8d7da;
    border-color: #f44336;
    color: #721c24;
}

.message-warning {
    background: #fff3cd;
    border-color: #FF9800;
    color: #856404;
}

.message-info {
    background: #d1ecf1;
    border-color: #2196F3;
    color: #0c5460;
}

.message-content {
    display: flex;
    align-items: center;
    gap: 10px;
}

.message-content i {
    font-size: 18px;
}

.message-content span {
    flex: 1;
}

.message-close {
    background: none;
    border: none;
    color: inherit;
    cursor: pointer;
    opacity: 0.7;
    padding: 0;
    width: 20px;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.message-close:hover {
    opacity: 1;
}

@keyframes slideInDown {
    from {
        transform: translateY(-10px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Student Navigation */
.student-navigation {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-top: 20px;
    border: 1px solid #dee2e6;
}

.btn-nav {
    padding: 8px 15px;
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 14px;
}

.btn-nav:hover:not(:disabled) {
    background: #5a6268;
}

.btn-nav:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-counter {
    font-weight: bold;
    color: #495057;
}

/* Keyboard shortcuts hint */
.keyboard-hint {
    font-size: 12px;
    color: #6c757d;
    margin-top: 5px;
    display: flex;
    gap: 15px;
}

.keyboard-hint kbd {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 2px 5px;
    font-family: monospace;
}

/* Search form improvements */
.search-form {
    display: flex;
    gap: 10px;
    align-items: flex-start;
}

.search-form input {
    width: 100%;
    flex: 1;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 16px;
    transition: all 0.3s ease;
}

.search-form input:focus {
    border-color: #28245f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .student-navigation {
        flex-direction: column;
        gap: 10px;
    }
    
    .nav-counter {
        order: -1;
    }
    
    .search-form {
        flex-direction: column;
    }
    
    .search-form input,
    .search-form button {
        width: 100%;
    }
}

/* Gift Counter Specific Styles */

.category-selector {
    display: flex;
    column-gap: 2%;
    background: #f8f9fa;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.category-group {
    width: 48%;
    margin-bottom: 15px;
}

.category-group:last-child {
    margin-bottom: 0;
}

.category-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #495057;
}

.category-buttons {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
}

.btn-category {
    flex: 1;
    min-width: 120px;
    padding: 10px 15px;
    background: #e9ecef;
    border: 2px solid #dee2e6;
    color: #495057;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-category:hover {
    background: #dee2e6;
    transform: translateY(-2px);
}

.btn-category.active {
    background: #28245f;
    border-color: #1c1a47;
    color: white;
}

.id-input-section {
    background: white;
    border: 2px solid #e0e0e0;
    border-radius: 10px;
    padding: 20px;
}

.id-display {
    margin-bottom: 20px;
}

.id-parts {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 5px;
    margin-bottom: 15px;
    font-size: 24px;
    font-weight: bold;
    color: #2c3e50;
}

.id-part {
    padding: 10px 20px;
    background: #f8f9fa;
    border-radius: 8px;
    min-width: 80px;
    text-align: center;
    border: 2px solid #dee2e6;
    transition: all 0.2s ease;
}

.id-part.active {
    background: #28245f;
    color: white;
    border-color: #1c1a47;
}

.id-separator {
    font-size: 28px;
    color: #6c757d;
}

#registrationId {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 18px;
    text-align: center;
    letter-spacing: 2px;
    text-transform: uppercase;
    transition: all 0.3s ease;
}

#registrationId:focus {
    border-color: #28245f;
    outline: none;
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.number-pad {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-bottom: 15px;
}

.number-row {
    display: flex;
    gap: 10px;
    justify-content: center;
}

.btn-num {
    flex: 1;
    max-width: 100px;
    padding: 15px;
    font-size: 20px;
    font-weight: bold;
    background: #f8f9fa;
    border: 2px solid #dee2e6;
    color: #495057;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.btn-num:hover {
    background: #e9ecef;
    transform: translateY(-2px);
}

.btn-num:active {
    transform: translateY(0);
}

.btn-clear {
    background: #e74c3c;
    border-color: #c0392b;
    color: white;
}

.btn-clear:hover {
    background: #c0392b;
}

.btn-search {
    background: #4CAF50;
    border-color: #45a049;
    color: white;
}

.btn-search:hover {
    background: #45a049;
}

.keyboard-hint {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
    justify-content: center;
    font-size: 12px;
    color: #6c757d;
    padding: 10px;
    background: #f8f9fa;
    border-radius: 6px;
}

.keyboard-hint kbd {
    background: white;
    border: 1px solid #dee2e6;
    border-radius: 3px;
    padding: 2px 5px;
    font-family: monospace;
    box-shadow: 0 2px 0 #dee2e6;
}

/* Gift Status Badges */
.gift-status {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 14px;
    font-weight: 500;
}

.gift-status.pending {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.gift-status.issued {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.gift-status.not-eligible {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-quick {
    flex: 1;
    padding: 12px;
    border: 2px solid #dee2e6;
    background: white;
    color: #495057;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.2s ease;
}

.btn-quick:hover {
    background: #f8f9fa;
    transform: translateY(-2px);
}

.btn-quick.primary {
    background: #28245f;
    border-color: #1c1a47;
    color: white;
}

.btn-quick.primary:hover {
    background: #1c1a47;
}

.btn-quick.success {
    background: #4CAF50;
    border-color: #005a04;
    color: white;
}

.btn-quick.success:hover {
    background: #45a049;
}

/* Responsive */
@media (max-width: 768px) {
    .category-buttons {
        flex-direction: column;
    }
    
    .btn-category {
        min-width: auto;
    }
    
    .number-pad {
        gap: 5px;
    }
    
    .number-row {
        gap: 5px;
    }
    
    .btn-num {
        padding: 12px;
        font-size: 18px;
        max-width: none;
    }
    
    .keyboard-hint {
        flex-direction: column;
        gap: 5px;
        align-items: center;
    }
    
    .id-parts {
        font-size: 18px;
    }
    
    .id-part {
        min-width: 60px;
        padding: 8px 12px;
    }
}

@media (max-width: 480px) {
    .id-parts {
        font-size: 16px;
    }
    
    .id-part {
        min-width: 50px;
        padding: 6px 10px;
    }
    
    .btn-num {
        padding: 10px;
        font-size: 16px;
    }
}

.main-section-container {
    display: flex;
    column-gap: 2%;
}

.main-section-container .search-section, .main-section-container .result-section {
    width: 48%;
}

.remove-sidebar .sidebar {
    display: none;
}

.remove-sidebar .main-content {
    margin-left: 0px;
}

.btn-full-width {
    width: 100%;
    justify-content: center;
}