<!-- PWA Styles -->
<style>
/* Android-style PWA Design */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary: #1976d2;
    --primary-dark: #1565c0;
    --primary-light: #42a5f5;
    --secondary: #03dac6;
    --surface: #ffffff;
    --surface-variant: #f5f5f5;
    --on-surface: #1c1b1f;
    --on-surface-variant: #49454f;
    --outline: #79747e;
    --shadow: rgba(0, 0, 0, 0.12);
    --success: #4caf50;
    --warning: #ff9800;
    --error: #f44336;
    --radius-small: 8px;
    --radius-medium: 12px;
    --radius-large: 16px;
    --elevation-1: 0 1px 3px rgba(0,0,0,0.12), 0 1px 2px rgba(0,0,0,0.24);
    --elevation-2: 0 3px 6px rgba(0,0,0,0.16), 0 3px 6px rgba(0,0,0,0.23);
    --elevation-3: 0 10px 20px rgba(0,0,0,0.19), 0 6px 6px rgba(0,0,0,0.23);
}

body {
    font-family: 'Roboto', 'Segoe UI', sans-serif;
    background: var(--surface-variant);
    margin: 0;
    padding: 0;
    line-height: 1.5;
    color: var(--on-surface);
    overflow-x: hidden;
}

/* Top App Bar */
.app-bar {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 16px 20px 24px;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: var(--elevation-2);
}

.app-bar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.app-bar h1 {
    font-size: 24px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.app-bar-subtitle {
    font-size: 16px;
    opacity: 0.9;
    font-weight: 300;
}

.notification-badge {
    position: relative;
    cursor: pointer;
    padding: 8px;
    border-radius: 50%;
    background: rgba(255,255,255,0.1);
    transition: background 0.2s;
}

.notification-badge:hover {
    background: rgba(255,255,255,0.2);
}

.badge-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--error);
    border-radius: 50%;
    border: 2px solid white;
}

/* Content Container */
.content-container {
    padding: 0;
    min-height: calc(100vh - 140px);
}

/* Card Styles */
.card {
    background: var(--surface);
    border-radius: var(--radius-medium);
    margin: 16px;
    padding: 20px;
    box-shadow: var(--elevation-1);
    transition: box-shadow 0.2s;
}

.card:hover {
    box-shadow: var(--elevation-2);
}

.card-header {
    display: flex;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--outline);
}

.card-header h2 {
    font-size: 20px;
    font-weight: 500;
    margin-left: 12px;
    color: var(--on-surface);
}

.card-header i {
    color: var(--primary);
    font-size: 24px;
}

/* Quick Actions Grid */
.quick-actions {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
    margin: 16px;
}

.quick-action-card {
    background: var(--surface);
    border-radius: var(--radius-medium);
    padding: 24px 20px;
    text-align: center;
    box-shadow: var(--elevation-1);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.quick-action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary);
    transform: scaleX(0);
    transition: transform 0.3s;
}

.quick-action-card:hover::before,
.quick-action-card:active::before {
    transform: scaleX(1);
}

.quick-action-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--elevation-3);
}

.quick-action-icon {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    color: white;
    font-size: 24px;
}

.quick-action-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--on-surface);
    margin-bottom: 4px;
}

.quick-action-subtitle {
    font-size: 14px;
    color: var(--on-surface-variant);
}

/* Schedule Items */
.schedule-list {
    gap: 12px;
}

.schedule-item {
    background: var(--surface-variant);
    border-radius: var(--radius-medium);
    padding: 16px;
    margin-bottom: 12px;
    border-left: 4px solid var(--primary);
    transition: all 0.2s;
}

.schedule-item:hover {
    background: var(--surface);
    box-shadow: var(--elevation-1);
}

.schedule-time {
    font-size: 14px;
    font-weight: 500;
    color: var(--primary);
    background: rgba(25, 118, 210, 0.1);
    padding: 4px 12px;
    border-radius: 16px;
    display: inline-block;
    margin-bottom: 8px;
}

.schedule-title {
    font-size: 18px;
    font-weight: 500;
    color: var(--on-surface);
    margin-bottom: 8px;
    line-height: 1.3;
}

.schedule-meta {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--on-surface-variant);
    font-size: 14px;
}

.schedule-meta i {
    width: 16px;
}

/* Material Items */
.material-item {
    background: var(--surface-variant);
    border-radius: var(--radius-medium);
    padding: 16px;
    margin-bottom: 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    transition: all 0.2s;
}

.material-item:hover {
    background: var(--surface);
    box-shadow: var(--elevation-1);
}

.material-info {
    flex: 1;
}

.material-title {
    font-size: 16px;
    font-weight: 500;
    color: var(--on-surface);
    margin-bottom: 4px;
}

.material-meta {
    font-size: 14px;
    color: var(--on-surface-variant);
    display: flex;
    align-items: center;
    gap: 16px;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 24px;
    border-radius: var(--radius-large);
    font-size: 16px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-primary {
    background: var(--primary);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-dark);
    box-shadow: var(--elevation-2);
}

.btn-secondary {
    background: var(--surface);
    color: var(--primary);
    border: 1px solid var(--outline);
}

.btn-secondary:hover {
    background: var(--surface-variant);
}

.btn-fab {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    position: fixed;
    bottom: 24px;
    right: 24px;
    background: var(--secondary);
    color: var(--on-surface);
    border: none;
    box-shadow: var(--elevation-3);
    cursor: pointer;
    font-size: 24px;
    transition: all 0.3s;
    z-index: 1000;
}

.btn-fab:hover {
    transform: scale(1.1);
    box-shadow: 0 8px 16px rgba(0,0,0,0.3);
}

.btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--primary);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 20px;
    transition: all 0.2s;
}

.btn-icon:hover {
    background: var(--primary-dark);
    transform: scale(1.05);
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: var(--surface);
    margin: 5% auto;
    border-radius: var(--radius-large);
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow: hidden;
    animation: slideUp 0.3s ease;
    box-shadow: var(--elevation-3);
}

.modal-header {
    background: var(--primary);
    color: white;
    padding: 20px 24px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    font-size: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 12px;
}

.modal-body {
    padding: 24px;
    max-height: calc(80vh - 80px);
    overflow-y: auto;
}

.close-btn {
    background: none;
    border: none;
    color: white;
    font-size: 24px;
    cursor: pointer;
    padding: 4px;
    border-radius: 50%;
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s;
}

.close-btn:hover {
    background: rgba(255,255,255,0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 48px 24px;
    color: var(--on-surface-variant);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    font-size: 18px;
    margin-bottom: 8px;
    color: var(--on-surface);
}

/* QR Scanner Styles */
.qr-scanner {
    background: var(--surface);
    border-radius: var(--radius-medium);
    padding: 24px;
    text-align: center;
}

.scanner-frame {
    width: 280px;
    height: 280px;
    border: 3px solid var(--primary);
    border-radius: var(--radius-medium);
    margin: 20px auto;
    position: relative;
    background: #000;
    overflow: hidden;
}

.scanner-line {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--secondary);
    animation: scanLine 2s infinite;
}

.scanner-corners {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
}

.scanner-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2px solid var(--secondary);
}

.scanner-corner.top-left {
    top: 0;
    left: 0;
    border-right: none;
    border-bottom: none;
}

.scanner-corner.top-right {
    top: 0;
    right: 0;
    border-left: none;
    border-bottom: none;
}

.scanner-corner.bottom-left {
    bottom: 0;
    left: 0;
    border-right: none;
    border-top: none;
}

.scanner-corner.bottom-right {
    bottom: 0;
    right: 0;
    border-left: none;
    border-top: none;
}

/* Animations */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from { transform: translateY(50px); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes scanLine {
    0% { top: 0; }
    50% { top: calc(100% - 2px); }
    100% { top: 0; }
}

@keyframes ripple {
    0% { transform: scale(0); opacity: 1; }
    100% { transform: scale(4); opacity: 0; }
}

/* Responsive Design */
@media (max-width: 600px) {
    .quick-actions {
        grid-template-columns: 1fr;
        gap: 12px;
        margin: 12px;
    }
    
    .card {
        margin: 12px;
        padding: 16px;
    }
    
    .modal-content {
        width: 95%;
        margin: 2% auto;
    }
    
    .scanner-frame {
        width: 240px;
        height: 240px;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    :root {
        --surface: #121212;
        --surface-variant: #1e1e1e;
        --on-surface: #e1e1e1;
        --on-surface-variant: #9e9e9e;
        --outline: #616161;
    }
}

/* Notification dot animation */
.notification-dot {
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0.7); }
    70% { box-shadow: 0 0 0 10px rgba(244, 67, 54, 0); }
    100% { box-shadow: 0 0 0 0 rgba(244, 67, 54, 0); }
}

/* Loading spinner */
.loading-spinner {
    width: 40px;
    height: 40px;
    border: 4px solid var(--surface-variant);
    border-top: 4px solid var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 20px auto;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
</style>