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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #f5f5f5;
    overflow-x: hidden;
}

/* App Container */
.app-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    background: white;
    min-height: 100vh;
    position: relative;
}

/* Screen Management */
.screen {
    display: none;
    min-height: 100vh;
    background: white;
}

.screen.active {
    display: block;
}

/* Header */
.header {
    background: #001157;
    color: white;
    padding: 16px;
}

.header.dark {
    background: #001157;
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo {
    width: 32px;
    height: 32px;
}

.app-title {
    font-size: 16px;
    font-weight: 600;
}

.menu-icon, .back-icon {
    font-size: 18px;
    cursor: pointer;
}

.refresh-icon {
    font-size: 16px;
    cursor: pointer;
    font-weight: 300;
}

/* Login Screen Styles */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 80px);
    padding: 20px;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

.login-card {
    background: white;
    border-radius: 20px;
    padding: 40px;
    width: 100%;
    max-width: 400px;
    box-shadow: 0 20px 40px rgba(0, 17, 87, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    text-align: center;
    margin-bottom: 32px;
}

.login-logo {
    margin-bottom: 24px;
}

.login-logo img {
    width: 64px;
    height: 64px;
}

.login-header h2 {
    font-size: 28px;
    font-weight: 700;
    color: #001157;
    margin-bottom: 8px;
}

.login-header p {
    font-size: 16px;
    color: #666;
    font-weight: 400;
}

.login-form {
    margin-bottom: 24px;
}

.form-group {
    margin-bottom: 24px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 16px;
    color: #001157;
    font-size: 16px;
}

.input-wrapper input {
    width: 100%;
    padding: 16px 16px 16px 48px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #f8f9fa;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #001157;
    background: white;
    box-shadow: 0 0 0 3px rgba(0, 17, 87, 0.1);
}

.input-wrapper input.error {
    border-color: #e74c3c;
    background: #fdf2f2;
}

.input-wrapper input.success {
    border-color: #27ae60;
    background: #f0f9f4;
}

.input-wrapper input::placeholder {
    color: #999;
}



.form-options {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.checkbox-wrapper {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.checkbox-wrapper input[type="checkbox"] {
    display: none;
}

.checkmark {
    width: 18px;
    height: 18px;
    border: 2px solid #ddd;
    border-radius: 4px;
    display: inline-block;
    position: relative;
    transition: all 0.3s ease;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark {
    background: #001157;
    border-color: #001157;
}

.checkbox-wrapper input[type="checkbox"]:checked + .checkmark::after {
    content: '✓';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: white;
    font-size: 12px;
    font-weight: bold;
}

.forgot-password {
    color: #001157;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.3s ease;
}

.forgot-password:hover {
    color: #0026b3;
    text-decoration: underline;
}

.login-btn {
    width: 100%;
    background: linear-gradient(135deg, #001157 0%, #0026b3 100%);
    color: white;
    border: none;
    padding: 16px;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 17, 87, 0.3);
}

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

.login-btn i {
    font-size: 14px;
    transition: transform 0.3s ease;
}

.login-btn:hover i {
    transform: translateX(4px);
}

.login-footer {
    text-align: center;
    padding-top: 24px;
    border-top: 1px solid #e1e5e9;
}

.login-footer p {
    font-size: 14px;
    color: #666;
    margin: 0;
}

.login-footer a {
    color: #001157;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
}

.login-footer a:hover {
    color: #0026b3;
    text-decoration: underline;
}

/* Timeline Section */
.timeline-section {
    padding: 16px;
    background: white;
}

.timeline-header h3 {
    font-size: 12px;
    color: #999;
    text-transform: uppercase;
    font-weight: 600;
    margin-bottom: 8px;
}

.date-time-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.date {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.time-container {
    display: flex;
    align-items: center;
    gap: 6px;
}

.time-icon {
    font-size: 16px;
    color: #333;
    font-weight: bold;
}

.time {
    font-size: 16px;
    font-weight: bold;
    color: #333;
}

.timeline-cards {
    display: flex;
    gap: 12px;
    overflow-x: auto;
    padding-bottom: 8px;
}

.no-activities {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 20px;
    text-align: center;
    color: #666;
    width: 100%;
}

.no-activities i {
    font-size: 32px;
    color: #ccc;
    margin-bottom: 8px;
}

.no-activities p {
    font-size: 14px;
    color: #999;
    font-weight: 500;
}

/* Navigation Grid */
.nav-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
    padding: 16px;
    background: white;
}

.nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 20px 16px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: white;
}

.nav-item:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.nav-icon {
    font-size: 24px;
    margin-bottom: 8px;
    color: white;
}

.nav-item span {
    font-size: 12px;
    color: white;
    text-align: center;
    font-weight: 500;
}

/* Tile Background Colors */
.nav-item.student-id { background: #6c757d; }
.nav-item.announcements { background: #3498db; }
.nav-item.calendar { background: #e74c3c; }
.nav-item.results { background: #27ae60; }
.nav-item.progress { background: #9b59b6; }
.nav-item.enrollments { background: #f39c12; }

/* Bottom Navigation */
.bottom-nav {
    position: fixed;
    bottom: 0;
    left: 0;
    width: 100%;
    background: #001157;
    display: flex;
    justify-content: space-around;
    padding: 12px 0;
    border-top: 1px solid #001157;
}

.nav-tab {
    display: flex;
    flex-direction: column;
    align-items: center;
    color: #95a5a6;
    cursor: pointer;
    transition: color 0.2s ease;
}

.nav-tab.active {
    color: white;
}

.nav-tab i {
    font-size: 16px;
    margin-bottom: 4px;
}

.nav-tab span {
    font-size: 10px;
    font-weight: 500;
}

/* Announcements Screen Styles */
.filter-tabs {
    display: flex;
    background: white;
    border-bottom: 1px solid #e0e0e0;
    overflow-x: auto;
    padding: 0 16px;
    justify-content: center;
}

.tab {
    padding: 12px 16px;
    font-size: 14px;
    color: #333;
    cursor: pointer;
    white-space: nowrap;
    border-bottom: 2px solid transparent;
    transition: all 0.2s ease;
}

.tab.active {
    color: #3498db;
    border-bottom-color: #3498db;
}

.announcements-list {
    padding: 16px;
    background: #f8f9fa;
    min-height: calc(100vh - 200px);
}

.announcement-card {
    background: white;
    border-radius: 8px;
    padding: 16px;
    margin-bottom: 12px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: relative;
}

.card-tag {
    position: absolute;
    top: 12px;
    left: 12px;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: 600;
    color: white;
    text-transform: uppercase;
}

.card-tag.exams { background: #3498db; }
.card-tag.general { background: #001157; }
.card-tag.classes { background: #f39c12; }

.card-menu {
    position: absolute;
    top: 12px;
    right: 12px;
    color: #666;
    cursor: pointer;
}

.card-content {
    margin-top: 24px;
}

.card-content p {
    font-size: 14px;
    color: #333;
    line-height: 1.4;
    margin-bottom: 8px;
}

.timestamp {
    font-size: 12px;
    color: #666;
}

/* Student ID Screen Styles */
.student-id-screen {
    background: white;
    min-height: 100vh;
}

.header-icons {
    display: flex;
    gap: 16px;
}

.header-icons i {
    font-size: 18px;
    cursor: pointer;
}

.id-card-container {
    padding: 20px;
    display: flex;
    justify-content: center;
}

.id-card {
    background: #001157;
    border-radius: 16px;
    padding: 16px 24px;
    width: 100%;
    max-width: 320px;
    color: white;
    box-shadow: 0 8px 24px rgba(26, 35, 126, 0.3);
}

.card-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    margin-bottom: 24px;
}

.university-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-logo {
    width: 32px;
    height: 32px;
}

.university-info h2 {
    font-size: 18px;
    font-weight: bold;
    margin: 0;
    color: white;
}

.card-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    margin-bottom: 24px;
    gap: 20px;
}

.info-grid {
    display: flex;
    justify-content: space-between;
    width: 100%;
    gap: 40px;
}

.info-column {
    flex: 1;
}

.info-column:first-child {
    flex: 0.8;
}

.info-column:last-child {
    flex: 1.2;
}

.info-row {
    margin-bottom: 12px;
}

.label {
    display: block;
    font-size: 12px;
    opacity: 0.8;
    margin-bottom: 2px;
}

.value {
    display: block;
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
}

.photo-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
}

.student-photo {
    width: 120px;
    height: 120px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.student-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 50%;
}

.student-label {
    background: white;
    color: #001157;
    padding: 4px 12px;
    border-radius: 4px;
    font-size: 10px;
    font-weight: bold;
    text-transform: uppercase;
}

.signature {
    font-family: cursive;
    font-size: 12px;
    color: white;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px 8px;
    border-radius: 4px;
}

.qr-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.qr-code {
    flex: 1;
}

.qr-placeholder {
    width: 80px;
    height: 80px;
    background: white;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.qr-placeholder i {
    font-size: 32px;
    color: #001157;
}

.qr-info {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timestamp-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.update-title {
    font-size: 12px;
    opacity: 0.8;
    font-weight: 500;
}

.timestamp {
    font-size: 12px;
    opacity: 0.6;
    color: white;
}

.refresh-icon {
    font-size: 14px;
    color: white;
    opacity: 0.7;
    cursor: pointer;
    transition: all 0.3s ease;
}

.refresh-icon:hover {
    opacity: 1;
    transform: rotate(180deg);
}

.refresh-icon:active {
    transform: rotate(360deg);
}

/* Loading screen overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 17, 87, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-content {
    background: white;
    border-radius: 16px;
    padding: 32px;
    text-align: center;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
    transform: scale(0.8);
    transition: transform 0.3s ease;
}

.loading-overlay.active .loading-content {
    transform: scale(1);
}

.loading-spinner {
    width: 48px;
    height: 48px;
    border: 4px solid #e0e0e0;
    border-top: 4px solid #001157;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-text {
    color: #333;
    font-size: 16px;
    font-weight: 500;
    margin: 0;
}

/* Results Screen Styles */
.results-screen {
    background: white;
    min-height: 100vh;
}

.results-container {
    padding: 20px;
}

.results-summary {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    gap: 12px;
    margin-bottom: 24px;
    padding: 0 4px;
}

.summary-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    border: 1px solid #e9ecef;
}

.summary-icon {
    margin-bottom: 8px;
}

.summary-icon i {
    font-size: 18px;
    color: #001157;
}

.summary-content h3 {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    margin-bottom: 2px;
    text-transform: uppercase;
}

.summary-content p {
    font-size: 16px;
    font-weight: 700;
    color: #001157;
    margin: 0;
}

.results-sections {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.year-section h3 {
    font-size: 20px;
    font-weight: 700;
    color: #001157;
    margin-bottom: 16px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e9ecef;
}

.semester-group {
    margin-bottom: 24px;
}

.semester-group h4 {
    font-size: 16px;
    font-weight: 600;
    color: #495057;
    margin-bottom: 16px;
    padding-left: 8px;
}

.course-results {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.course-result {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px;
    background: white;
    border-radius: 12px;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.course-result:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.1);
}

.course-result.passed {
    border-color: #28a745;
    background: #f8fff9;
}

.course-result.failed {
    border-color: #dc3545;
    background: #fff8f8;
}

.course-result.in-progress {
    border-color: #ffc107;
    background: #fffdf0;
}

.course-info {
    flex: 1;
}

.course-info h5 {
    font-size: 14px;
    font-weight: 600;
    color: #333;
    margin: 0 0 4px 0;
    line-height: 1.3;
}

.credits {
    font-size: 12px;
    color: #666;
    font-weight: 500;
}

.grade {
    font-size: 18px;
    font-weight: 700;
    color: #001157;
    min-width: 60px;
    text-align: center;
}

.grade-label {
    font-size: 10px;
    font-weight: 600;
    text-transform: uppercase;
    padding: 4px 8px;
    border-radius: 4px;
    margin-left: 8px;
}

.course-result.passed .grade-label {
    background: #28a745;
    color: white;
}

.course-result.failed .grade-label {
    background: #dc3545;
    color: white;
}

.course-result.in-progress .grade {
    color: #ffc107;
    font-size: 14px;
}

/* Responsive adjustments for results */
@media (max-width: 768px) {
    .results-summary {
        grid-template-columns: 1fr 1fr 1fr;
        gap: 8px;
        padding: 0 2px;
    }
    
    .results-container {
        padding: 16px;
    }
    
    .summary-card {
        padding: 8px;
    }
    
    .summary-icon i {
        font-size: 16px;
    }
    
    .summary-content h3 {
        font-size: 10px;
    }
    
    .summary-content p {
        font-size: 14px;
    }
    
    .course-result {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .grade {
        align-self: flex-end;
    }
}

/* Progress Screen Styles */
.progress-screen {
    background: white;
    min-height: 100vh;
}

.progress-container {
    padding: 20px;
}

.progress-overview {
    text-align: center;
    margin-bottom: 32px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 16px;
}

.progress-overview h2 {
    font-size: 24px;
    font-weight: 700;
    color: #001157;
    margin-bottom: 8px;
}

.progress-overview p {
    font-size: 18px;
    font-weight: 600;
    color: #666;
    margin: 0;
}

.progress-bar-container {
    margin-bottom: 32px;
}

.progress-bar {
    width: 100%;
    height: 24px;
    background: #e9ecef;
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin-bottom: 16px;
}

.progress-fill {
    height: 100%;
    transition: width 0.8s ease;
}

.progress-fill.completed {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.progress-fill.in-progress {
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

.progress-fill.remaining {
    background: linear-gradient(90deg, #6c757d 0%, #495057 100%);
}

.progress-labels {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.progress-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
}

.progress-legend {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 32px;
    padding: 20px;
    background: white;
    border-radius: 16px;
    border: 1px solid #e9ecef;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 12px;
}

.legend-color {
    width: 20px;
    height: 20px;
    border-radius: 4px;
    flex-shrink: 0;
}

.legend-color.completed {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.legend-color.in-progress {
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

.legend-color.remaining {
    background: linear-gradient(90deg, #6c757d 0%, #495057 100%);
}

.legend-item span {
    font-size: 14px;
    font-weight: 500;
    color: #333;
}

.progress-details {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.progress-section {
    background: white;
    border-radius: 16px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

.progress-section h3 {
    font-size: 18px;
    font-weight: 600;
    color: #001157;
    margin-bottom: 16px;
}

.year-progress {
    display: flex;
    align-items: center;
    gap: 16px;
}

.year-bar {
    flex: 1;
    height: 16px;
    background: #e9ecef;
    border-radius: 8px;
    overflow: hidden;
    position: relative;
}

.year-fill {
    height: 100%;
    transition: width 0.8s ease;
}

.year-fill.completed {
    background: linear-gradient(90deg, #28a745 0%, #20c997 100%);
}

.year-fill.in-progress {
    background: linear-gradient(90deg, #ffc107 0%, #fd7e14 100%);
}

.year-text {
    font-size: 14px;
    font-weight: 600;
    color: #666;
    min-width: 120px;
    text-align: right;
}

/* Responsive adjustments for progress */
@media (max-width: 768px) {
    .progress-container {
        padding: 16px;
    }
    
    .progress-overview {
        padding: 16px;
    }
    
    .progress-overview h2 {
        font-size: 20px;
    }
    
    .progress-overview p {
        font-size: 16px;
    }
    
    .progress-legend {
        padding: 16px;
    }
    
    .progress-section {
        padding: 16px;
    }
    
    .year-progress {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
    
    .year-text {
        text-align: left;
        min-width: auto;
    }
}

/* Scrollbar Styling */
::-webkit-scrollbar {
    width: 4px;
    height: 4px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: #c0c0c0;
    border-radius: 2px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a0a0a0;
} 