/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Roboto', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* Loading Screen */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.95);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.spinner {
    border: 4px solid #f3f3f3;
    border-top: 4px solid #667eea;
    border-radius: 50%;
    width: 50px;
    height: 50px;
    animation: spin 1s linear infinite;
}

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

/* Login Screen */
.login-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-container {
    background: white;
    border-radius: 20px;
    padding: 50px 40px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    text-align: center;
    max-width: 450px;
    width: 90%;
}

.login-header {
    margin-bottom: 30px;
}

.logo-icon {
    font-size: 60px;
    color: #667eea;
    margin-bottom: 15px;
}

.logo-image {
    max-width: 300px;
    width: 100%;
    height: auto;
    margin-bottom: 15px;
    opacity: 0.95;
}

.login-header h1 {
    font-size: 32px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 700;
}

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

.login-subtitle {
    color: #666;
    margin-bottom: 30px;
    font-size: 15px;
}

.login-content {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.g_id_signin {
    margin: 20px 0;
}

.login-note {
    margin-top: 20px;
    font-size: 13px;
    color: #666;
    display: flex;
    align-items: center;
    gap: 8px;
}

.login-note i {
    color: #667eea;
}

/* Quote Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.8);
    justify-content: center;
    align-items: center;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background: white;
    padding: 50px;
    border-radius: 20px;
    max-width: 600px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.4s ease;
}

.quote-modal {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.quote-icon {
    font-size: 48px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.quote-modal h2 {
    font-size: 28px;
    margin-bottom: 30px;
    font-weight: 600;
}

.quote-text {
    font-size: 22px;
    font-style: italic;
    line-height: 1.6;
    margin-bottom: 20px;
    font-weight: 300;
}

.quote-author {
    font-size: 18px;
    margin-bottom: 40px;
    font-weight: 500;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

/* Main App */
.main-app {
    min-height: 100vh;
    background: #f5f7fa;
}

/* Header */
.app-header {
    background: white;
    padding: 20px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left i {
    font-size: 28px;
    color: #667eea;
}

.header-logo {
    height: 40px;
    width: auto;
    opacity: 0.95;
}

.header-left h1 {
    font-size: 24px;
    color: #333;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-name {
    font-weight: 500;
    color: #333;
}

.user-photo {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid #667eea;
}

/* Navigation */
.app-nav {
    background: white;
    padding: 0;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    display: flex;
    gap: 0;
    overflow-x: auto;
}

.nav-btn {
    background: white;
    border: none;
    padding: 18px 30px;
    font-size: 15px;
    font-weight: 500;
    color: #666;
    cursor: pointer;
    transition: all 0.3s ease;
    border-bottom: 3px solid transparent;
    display: flex;
    align-items: center;
    gap: 8px;
    white-space: nowrap;
}

.nav-btn:hover {
    background: #f8f9fa;
    color: #667eea;
}

.nav-btn.active {
    color: #667eea;
    border-bottom-color: #667eea;
    background: #f8f9fa;
}

.nav-btn i {
    font-size: 18px;
}

/* Main Content */
.app-content {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

.content-view {
    display: none;
}

.content-view.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

/* Form Container */
.form-container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    max-width: 1000px;
    margin: 0 auto;
}

.form-header {
    text-align: center;
    margin-bottom: 40px;
    border-bottom: 2px solid #f0f0f0;
    padding-bottom: 20px;
}

.form-header h2 {
    font-size: 28px;
    color: #333;
    margin-bottom: 10px;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.form-header i {
    color: #667eea;
}

.form-date {
    color: #666;
    font-size: 16px;
    font-weight: 500;
}

/* Form Sections */
.form-section {
    margin-bottom: 35px;
}

.form-section h3 {
    font-size: 20px;
    color: #333;
    margin-bottom: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f0f0f0;
}

.form-section h3 i {
    color: #667eea;
    font-size: 22px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.form-group {
    display: flex;
    flex-direction: column;
}

.form-group label {
    font-weight: 500;
    color: #555;
    margin-bottom: 8px;
    font-size: 14px;
}

.form-group input,
.form-group select,
.form-group textarea {
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    font-family: 'Inter', sans-serif;
    transition: all 0.3s ease;
    background: white;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

/* Buttons */
.btn-primary, .btn-secondary, .btn-submit, .btn-logout {
    padding: 12px 30px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: 'Inter', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 20px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-submit {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    padding: 15px;
    font-size: 18px;
}

.btn-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 25px rgba(102, 126, 234, 0.4);
}

.btn-logout {
    background: #f44336;
    color: white;
    padding: 10px 20px;
    font-size: 14px;
}

.btn-logout:hover {
    background: #d32f2f;
}

.form-actions {
    margin-top: 40px;
    padding-top: 30px;
    border-top: 2px solid #f0f0f0;
}

/* Stats Cards */
.stats-container, .admin-container, .reports-container {
    background: white;
    border-radius: 15px;
    padding: 40px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
}

.stats-container h2, .admin-container h2, .reports-container h2 {
    font-size: 28px;
    margin-bottom: 30px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 600;
}

.stats-container h2 i, .admin-container h2 i, .reports-container h2 i {
    color: #667eea;
}

.stats-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 20px;
    margin-bottom: 40px;
}

.stat-card {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 25px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    gap: 20px;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
    transition: transform 0.3s ease;
}

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

.stat-icon {
    font-size: 40px;
    opacity: 0.9;
}

.stat-info {
    flex: 1;
}

.stat-label {
    font-size: 14px;
    opacity: 0.9;
    margin-bottom: 5px;
    font-weight: 500;
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
}

/* Chart Container */
.chart-container {
    background: #f8f9fa;
    padding: 30px;
    border-radius: 12px;
    margin-bottom: 30px;
}

.chart-container h3 {
    font-size: 20px;
    margin-bottom: 20px;
    color: #333;
    font-weight: 600;
}

/* Admin Controls */
.admin-controls, .report-controls {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
    align-items: center;
}

.filter-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.filter-group label {
    font-weight: 500;
    color: #555;
}

.filter-group select,
.filter-group input[type="date"] {
    padding: 10px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Inter', sans-serif;
    background: white;
}

/* Report Table */
.table-container {
    overflow-x: auto;
    margin-top: 30px;
}

.report-table {
    width: 100%;
    border-collapse: collapse;
    background: white;
}

.report-table th,
.report-table td {
    padding: 15px;
    text-align: left;
    border-bottom: 1px solid #e0e0e0;
}

.report-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    position: sticky;
    top: 0;
}

.report-table tr:hover {
    background: #f8f9fa;
}

.no-data {
    text-align: center;
    padding: 40px;
    color: #666;
    font-size: 16px;
}

/* Toast Notification */
.toast {
    position: fixed;
    bottom: 30px;
    right: 30px;
    background: #333;
    color: white;
    padding: 15px 25px;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
    transform: translateY(100px);
    opacity: 0;
    transition: all 0.3s ease;
    z-index: 10000;
}

.toast.show {
    transform: translateY(0);
    opacity: 1;
}

.toast.success {
    background: #4caf50;
}

.toast.error {
    background: #f44336;
}

/* Responsive Design */
@media (max-width: 768px) {
    .app-header {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .header-left h1 {
        font-size: 20px;
    }

    .header-logo {
        height: 30px;
    }

    .logo-image {
        max-width: 250px;
    }

    .app-content {
        padding: 15px;
    }

    .form-container,
    .stats-container,
    .admin-container,
    .reports-container {
        padding: 20px;
    }

    .form-header h2,
    .stats-container h2,
    .admin-container h2,
    .reports-container h2 {
        font-size: 22px;
    }

    .form-row {
        grid-template-columns: 1fr;
    }

    .stats-summary {
        grid-template-columns: 1fr;
    }

    .admin-controls,
    .report-controls {
        flex-direction: column;
        align-items: stretch;
    }

    .filter-group {
        flex-direction: column;
        align-items: stretch;
    }

    .nav-btn {
        padding: 15px 20px;
        font-size: 14px;
    }

    .login-container {
        padding: 30px 25px;
    }

    .modal-content {
        padding: 30px 20px;
    }

    .quote-text {
        font-size: 18px;
    }

    .quote-author {
        font-size: 16px;
    }
}

@media (max-width: 480px) {
    .header-left i {
        font-size: 24px;
    }

    .header-left h1 {
        font-size: 18px;
    }

    .header-logo {
        height: 25px;
    }

    .logo-image {
        max-width: 200px;
    }

    .user-name {
        display: none;
    }

    .form-section h3 {
        font-size: 18px;
    }

    .btn-submit {
        font-size: 16px;
    }

    .stat-card {
        flex-direction: column;
        text-align: center;
    }
}

/* Print Styles */
@media print {
    .app-header,
    .app-nav,
    .admin-controls,
    .report-controls {
        display: none;
    }

    .content-view {
        display: block !important;
    }

    .report-table {
        font-size: 12px;
    }

    .report-table th,
    .report-table td {
        padding: 8px;
    }
}
