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

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

/* Login Container Styles */
.login-container {
    width: 100vw;
    height: 100vh;
    position: relative;
    overflow: hidden;
}

/* Excel Background */
.excel-background {
    width: 100%;
    height: 100%;
    background: #f2f2f2;
    position: relative;
    filter: blur(2px);
    overflow: hidden;
}

/* Excel Navigation */
.excel-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #217346;
    color: white;
    padding: 8px 20px;
    font-size: 14px;
}

.excel-nav-left, .excel-nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.excel-icon {
    font-size: 18px;
    margin-right: 10px;
}

.nav-text {
    padding: 5px 10px;
    border-radius: 3px;
    cursor: pointer;
    transition: background-color 0.2s;
}

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

.nav-text.active {
    background-color: rgba(255,255,255,0.2);
    font-weight: 600;
}

/* Excel Toolbar */
.excel-toolbar {
    display: flex;
    align-items: center;
    background: #f8f9fa;
    padding: 10px 20px;
    border-bottom: 1px solid #dee2e6;
    gap: 20px;
}

.toolbar-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.tool-btn {
    background: none;
    border: 1px solid transparent;
    padding: 6px 8px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.2s;
}

.tool-btn:hover {
    background: #e9ecef;
    border-color: #dee2e6;
}

.font-select, .size-select {
    border: 1px solid #dee2e6;
    padding: 4px 8px;
    border-radius: 4px;
    background: white;
    font-size: 12px;
}

/* Excel Spreadsheet */
.excel-sheet {
    background: white;
    height: calc(100vh - 120px);
    overflow: hidden;
}

.excel-header {
    background: #f8f9fa;
    border-bottom: 2px solid #dee2e6;
}

.row-numbers {
    display: grid;
    grid-template-columns: 40px repeat(10, 100px);
    gap: 1px;
    background: #dee2e6;
}

.cell-selector {
    background: #f8f9fa;
    height: 25px;
    border: 1px solid #dee2e6;
}

.column-header {
    background: #f8f9fa;
    height: 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 12px;
    border: 1px solid #dee2e6;
    color: #495057;
}

.excel-body {
    height: calc(100vh - 170px);
    overflow-y: auto;
}

.excel-row {
    display: grid;
    grid-template-columns: 40px repeat(10, 100px);
    gap: 1px;
    background: #dee2e6;
    margin-bottom: 1px;
}

.row-number {
    background: #f8f9fa;
    height: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    font-weight: 600;
    color: #495057;
    border: 1px solid #dee2e6;
}

.excel-cell {
    background: white;
    height: 20px;
    display: flex;
    align-items: center;
    padding: 0 8px;
    font-size: 11px;
    color: #333;
    border: 1px solid #dee2e6;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.excel-row:nth-child(1) .excel-cell {
    font-weight: 600;
    background: #e3f2fd;
}

.excel-row:nth-child(even) .excel-cell {
    background: #f9f9f9;
}

/* Login Modal */
.login-modal {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    z-index: 1000;
}

.modal-content {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 400px;
    max-width: 90vw;
    text-align: center;
}

.company-logo {
    margin-bottom: 25px;
}

.company-logo img {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 15px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}

.modal-content h2 {
    color: #333;
    margin-bottom: 10px;
    font-size: 20px;
    font-weight: 600;
}

.verification-text {
    color: #666;
    margin-bottom: 25px;
    font-size: 14px;
}

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

.form-group input {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #0078d4;
}

.sign-in-button {
    width: 100%;
    padding: 12px;
    background: linear-gradient(135deg, #217346 0%, #1a5c37 100%);
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    margin-bottom: 20px;
    transition: all 0.3s;
    animation: warning-pulse 2s infinite;
}

@keyframes warning-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(33, 115, 70, 0.7); }
    50% { box-shadow: 0 0 0 10px rgba(33, 115, 70, 0); }
}

.sign-in-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(33, 115, 70, 0.4);
}

.modal-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 20px;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
}

.checkbox-group label {
    font-size: 14px;
    color: #666;
    cursor: pointer;
}

.forgot-password {
    color: #0078d4;
    text-decoration: none;
    font-size: 14px;
}

.forgot-password:hover {
    text-decoration: underline;
}

/* Loading Page Styles */
.loading-page {
    width: 100vw;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.loading-content {
    text-align: center;
    color: white;
}

.loading-spinner {
    margin-bottom: 30px;
}

.spinner {
    width: 60px;
    height: 60px;
    border: 6px solid rgba(255,255,255,0.3);
    border-top: 6px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

.loading-content h2 {
    font-size: 24px;
    margin-bottom: 20px;
}

.progress-bar {
    width: 300px;
    height: 8px;
    background: rgba(255,255,255,0.3);
    border-radius: 4px;
    margin: 20px auto;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: white;
    border-radius: 4px;
    transition: width 0.5s ease;
    width: 0%;
}

.loading-dots {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 20px;
}

.loading-dots span {
    width: 12px;
    height: 12px;
    background: white;
    border-radius: 50%;
    animation: dots 1.4s infinite both;
}

.loading-dots span:nth-child(1) { animation-delay: -0.32s; }
.loading-dots span:nth-child(2) { animation-delay: -0.16s; }

@keyframes dots {
    0%, 80%, 100% { transform: scale(0); }
    40% { transform: scale(1); }
}

/* Admin Login Page Styles */
.admin-login-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #217346 0%, #1a5c37 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.admin-login-modal {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 500px;
    width: 90%;
    text-align: center;
}

.admin-login-header {
    margin-bottom: 30px;
    color: #217346;
}

.admin-login-header h2 {
    font-size: 24px;
    margin-bottom: 10px;
    font-weight: bold;
}

.admin-login-header p {
    margin-bottom: 5px;
    color: #666;
}

.admin-password-field {
    margin-bottom: 20px;
    text-align: left;
}

.admin-password-field label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #333;
}

.admin-password-field input {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.admin-password-field input:focus {
    outline: none;
    border-color: #217346;
}

.admin-login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #217346 0%, #1a5c37 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s;
}

.admin-login-btn:hover {
    transform: translateY(-2px);
}

/* Admin Page Styles */
.admin-page {
    min-height: 100vh;
    background: #f8f9fa;
    padding: 20px;
}

.admin-header {
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    margin-bottom: 30px;
    text-align: center;
}

.admin-header h1 {
    color: #333;
    margin-bottom: 10px;
    font-size: 28px;
}

.admin-header p {
    color: #666;
    margin-bottom: 20px;
}

.admin-actions {
    display: flex;
    justify-content: center;
    gap: 15px;
    flex-wrap: wrap;
}

.clear-logs-btn {
    background: #dc3545;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.clear-logs-btn:hover {
    background: #c82333;
}

.logout-btn {
    background: #217346;
    color: white;
    border: none;
    padding: 10px 20px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    transition: background-color 0.3s;
}

.logout-btn:hover {
    background: #1a5c37;
}

.logs-container {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    overflow: hidden;
}

.no-logs {
    padding: 60px;
    text-align: center;
    color: #666;
    font-size: 18px;
}

.logs-table {
    width: 100%;
}

.table-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 2fr;
    gap: 20px;
    padding: 20px;
    background: #f8f9fa;
    font-weight: 600;
    color: #333;
    border-bottom: 2px solid #dee2e6;
}

.table-row {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr 2fr;
    gap: 20px;
    padding: 20px;
    border-bottom: 1px solid #dee2e6;
    transition: background-color 0.2s;
}

.table-row:hover {
    background: #f8f9fa;
}

.table-row:last-child {
    border-bottom: none;
}

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

/* Disclaimer Page Styles */
.disclaimer-page {
    min-height: 100vh;
    background: linear-gradient(135deg, #ff6b6b 0%, #ee5a24 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 20px;
}

.disclaimer-content {
    background: white;
    padding: 40px;
    border-radius: 15px;
    box-shadow: 0 20px 40px rgba(0,0,0,0.3);
    max-width: 800px;
    width: 100%;
    text-align: center;
}

.warning-icon {
    font-size: 60px;
    margin-bottom: 20px;
    animation: warning-shake 0.5s ease-in-out infinite alternate;
}

@keyframes warning-shake {
    from { transform: rotate(-5deg); }
    to { transform: rotate(5deg); }
}

.disclaimer-content h1 {
    color: #d32f2f;
    font-size: 32px;
    margin-bottom: 30px;
    font-weight: bold;
}

.alert-box {
    background: #ffebee;
    border: 3px solid #d32f2f;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
}

.alert-box h2 {
    color: #d32f2f;
    font-size: 20px;
    margin-bottom: 15px;
}

.alert-box p {
    color: #333;
    font-size: 16px;
    font-weight: 600;
}

.educational-content {
    text-align: left;
}

.educational-content h3 {
    color: #333;
    margin: 25px 0 15px;
    font-size: 22px;
}

.educational-content ul {
    margin-bottom: 25px;
    padding-left: 20px;
}

.educational-content li {
    margin-bottom: 10px;
    color: #555;
    line-height: 1.6;
}

.protection-tips {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.tip {
    background: #f8f9fa;
    padding: 20px;
    border-radius: 10px;
    border-left: 5px solid #28a745;
}

.tip h4 {
    color: #28a745;
    margin-bottom: 10px;
    font-size: 16px;
}

.tip p {
    color: #555;
    line-height: 1.5;
    font-size: 14px;
}

.remember-box {
    background: #e3f2fd;
    border: 2px solid #2196f3;
    border-radius: 10px;
    padding: 25px;
    margin-bottom: 30px;
    text-align: center;
}

.remember-box h3 {
    color: #1976d2;
    margin-bottom: 15px;
}

.remember-box p {
    color: #333;
    font-size: 16px;
    margin-bottom: 10px;
}

.training-complete {
    text-align: center;
    padding: 25px;
    background: #e8f5e8;
    border-radius: 10px;
    border: 2px solid #28a745;
}

.training-complete h3 {
    color: #28a745;
    margin-bottom: 15px;
}

.return-btn {
    background: #28a745;
    color: white;
    border: none;
    padding: 15px 30px;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    margin-top: 15px;
    transition: all 0.3s;
}

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

/* Responsive Design */
@media (max-width: 768px) {
    .modal-content {
        width: 90%;
        padding: 20px;
    }
    
    .table-header,
    .table-row {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .protection-tips {
        grid-template-columns: 1fr;
    }
    
    .excel-nav-left,
    .excel-nav-right {
        gap: 10px;
    }
    
    .nav-text {
        display: none;
    }
    
    .nav-text.active {
        display: block;
    }
    
    .excel-toolbar {
        padding: 8px 15px;
        gap: 15px;
    }
    
    .row-numbers,
    .excel-row {
        grid-template-columns: 30px repeat(5, 80px);
    }
    
    .excel-cell {
        font-size: 10px;
        padding: 0 4px;
    }
    
    .disclaimer-content {
        padding: 20px;
    }
    
    .disclaimer-content h1 {
        font-size: 24px;
    }
    
    .company-logo img {
        width: 60px;
        height: 60px;
    }
}