/* TekniClean Dashboard - Modern Responsive Design */

/* Import font */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

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

.tcd-container {
    min-height: 100vh;
    background: #f5f7fa;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Verification Screen */
.tcd-verification-screen {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.tcd-verification-card {
    background: white;
    border-radius: 20px;
    padding: 50px;
    max-width: 500px;
    width: 100%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.5s ease;
}

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

.tcd-logo-container {
    text-align: center;
    margin-bottom: 30px;
}

.tcd-logo-container img {
    max-width: 200px;
    height: auto;
}

.tcd-verification-card h1 {
    text-align: center;
    color: #2c3e50;
    font-size: 2em;
    margin-bottom: 10px;
    font-weight: 600;
}

.tcd-subtitle {
    text-align: center;
    color: #7f8c8d;
    margin-bottom: 30px;
    font-size: 1.05em;
}

.tcd-verification-step {
    margin-top: 30px;
}

.tcd-verification-form {
    margin-top: 20px;
}

.tcd-form-group {
    margin-bottom: 25px;
}

.tcd-form-group label {
    display: flex;
    align-items: center;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 10px;
    font-size: 0.95em;
}

.tcd-icon {
    margin-right: 8px;
    font-size: 1.2em;
}

.tcd-form-group input {
    width: 100%;
    padding: 15px;
    border: 2px solid #e0e6ed;
    border-radius: 10px;
    font-size: 1em;
    transition: all 0.3s ease;
    font-family: inherit;
}

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

.tcd-form-group input[type="text"][name="code"] {
    font-size: 1.8em;
    text-align: center;
    letter-spacing: 8px;
    font-weight: 600;
}

.tcd-help-text {
    display: block;
    margin-top: 8px;
    color: #95a5a6;
    font-size: 0.85em;
}

.tcd-error-message {
    background: #fee;
    color: #c33;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: none;
    font-size: 0.9em;
}

.tcd-success-message {
    background: #d4edda;
    color: #155724;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-size: 0.9em;
}

.tcd-btn {
    width: 100%;
    padding: 15px 30px;
    border: none;
    border-radius: 10px;
    font-size: 1em;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
    margin-bottom: 10px;
    font-family: inherit;
}

.tcd-btn-primary {
    background: linear-gradient(45deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.tcd-btn-primary:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.6);
}

.tcd-btn-secondary {
    background: #95a5a6;
    color: white;
}

.tcd-btn.loading .tcd-btn-text {
    opacity: 0;
}

.tcd-btn.loading .tcd-btn-loader {
    display: block;
}

.tcd-btn-loader {
    display: none;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

.tcd-resend-info {
    text-align: center;
    margin-top: 20px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
}

.tcd-btn-link {
    background: none;
    border: none;
    color: #667eea;
    cursor: pointer;
    font-size: 0.95em;
    font-weight: 600;
    text-decoration: underline;
    padding: 5px 10px;
}

.tcd-verification-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
    color: #7f8c8d;
    font-size: 0.9em;
}

/* Dashboard Screen */
.tcd-dashboard-screen {
    min-height: 100vh;
    background: #f5f7fa;
    animation: fadeIn 0.5s ease;
}

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

/* Header */
.tcd-header {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.tcd-header-content {
    max-width: 1400px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 20px;
}

.tcd-header .tcd-logo-container {
    margin: 0;
}

.tcd-header .tcd-logo-container img {
    max-width: 120px;
    height: auto;
}

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

.tcd-welcome {
    color: #2c3e50;
    font-size: 0.95em;
    font-weight: 500;
    transition: opacity 0.2s;
}

.tcd-welcome.tcd-hidden {
    opacity: 0;
    pointer-events: none;
    width: 0;
    overflow: hidden;
    margin: 0;
}

.tcd-toggle-name-btn {
    background: none;
    border: 1px solid rgba(0,0,0,0.12);
    border-radius: 6px;
    padding: 4px 8px;
    font-size: 14px;
    cursor: pointer;
    color: #888;
    transition: all 0.2s;
    line-height: 1;
}

.tcd-toggle-name-btn:hover {
    background: rgba(0,0,0,0.06);
    color: #444;
}

.tcd-logout-btn {
    padding: 8px 20px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.9em;
    transition: all 0.3s ease;
}

.tcd-logout-btn:hover {
    background: #c0392b;
    transform: translateY(-1px);
}

.tcd-admin-email-btn {
    display: inline-flex;
    align-items: center;
    padding: 8px 16px;
    background: #3498db;
    color: white;
    text-decoration: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.2s, transform 0.2s;
}
.tcd-admin-email-btn:hover {
    background: #2980b9;
    color: white;
    transform: translateY(-1px);
}

.tcd-back-to-dashboard {
    display: inline-block;
    padding: 10px 16px;
    background: #f0f0f0;
    color: #333;
    text-decoration: none;
    border-radius: 8px;
    font-weight: 500;
    transition: background 0.2s;
}
.tcd-back-to-dashboard:hover {
    background: #e0e0e0;
    color: #333;
}

/* Dashboard Content */
.tcd-dashboard-content {
    max-width: 1400px;
    margin: 0 auto;
    padding: 40px 20px;
}

.tcd-page-header {
    text-align: center;
    margin-bottom: 50px;
}

.tcd-dashboard-title {
    color: #2c3e50;
    font-size: 2.5em;
    font-weight: 700;
    margin-bottom: 10px;
}

.tcd-dashboard-subtitle {
    color: #7f8c8d;
    font-size: 1.1em;
    font-weight: 400;
}

/* Cards Container */
.tcd-cards-container {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
    margin-bottom: 60px;
}

/* Card Styling - Modern Design */
.tcd-card {
    background: white;
    border-radius: 12px;
    padding: 40px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
}

.tcd-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 5px;
    transition: all 0.3s ease;
}

.tcd-card-accident::before {
    background: linear-gradient(90deg, #6D92AC, #4c6c7f);
}

.tcd-card-nearmiss::before {
    background: linear-gradient(90deg, #f39c12, #e67e22);
}

.tcd-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
}

.tcd-card-header {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.tcd-card-icon {
    font-size: 3em;
    line-height: 1;
}

.tcd-card-title {
    font-size: 1.6em;
    color: #2c3e50;
    margin: 0;
    font-weight: 700;
}

.tcd-card-description {
    color: #7f8c8d;
    margin-bottom: 25px;
    font-size: 1em;
    line-height: 1.6;
}

.tcd-card-features {
    list-style: none;
    padding: 0;
    margin: 0 0 30px 0;
}

.tcd-card-features li {
    padding: 12px 0;
    color: #34495e;
    font-size: 0.95em;
    border-bottom: 1px solid #ecf0f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.tcd-card-features li:last-child {
    border-bottom: none;
}

.tcd-check {
    color: #27ae60;
    font-weight: bold;
    font-size: 1.2em;
}

.tcd-card-btn {
    display: block;
    width: 100%;
    padding: 16px 25px;
    text-align: center;
    color: white;
    text-decoration: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 0.95em;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.tcd-btn-accident {
    background: linear-gradient(135deg, #6D92AC 0%, #4c6c7f 100%);
    box-shadow: 0 4px 15px rgba(109, 146, 172, 0.4);
}

.tcd-btn-accident:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(109, 146, 172, 0.6);
}

.tcd-btn-nearmiss {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    box-shadow: 0 4px 15px rgba(243, 156, 18, 0.4);
}

.tcd-btn-nearmiss:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(243, 156, 18, 0.6);
}

/* Info Banner */
.tcd-info-banner {
    background: white;
    border-radius: 12px;
    padding: 35px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
}

.tcd-info-banner-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 30px;
    padding-bottom: 20px;
    border-bottom: 2px solid #ecf0f1;
}

.tcd-info-banner-header .tcd-info-icon {
    font-size: 2em;
}

.tcd-info-banner-header h3 {
    color: #2c3e50;
    font-size: 1.5em;
    margin: 0;
    font-weight: 700;
}

.tcd-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
}

.tcd-info-item {
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.tcd-info-icon-small {
    font-size: 1.8em;
    flex-shrink: 0;
}

.tcd-info-content strong {
    display: block;
    color: #2c3e50;
    margin-bottom: 5px;
    font-size: 1em;
    font-weight: 600;
}

.tcd-info-content p {
    color: #7f8c8d;
    margin: 0;
    font-size: 0.9em;
    line-height: 1.5;
}

/* Tablet - 768px to 1024px */
@media (max-width: 1024px) {
    .tcd-cards-container {
        grid-template-columns: 1fr;
        gap: 25px;
    }
    
    .tcd-dashboard-content {
        padding: 30px 20px;
    }
    
    .tcd-dashboard-title {
        font-size: 2em;
    }
}

/* Mobile - Under 768px */
@media (max-width: 768px) {
    .tcd-verification-card {
        padding: 30px;
    }
    
    .tcd-header {
        padding: 15px 20px;
    }
    
    .tcd-header-content {
        flex-direction: column;
        text-align: center;
    }
    
    .tcd-user-info {
        flex-direction: column;
        gap: 10px;
    }
    
    .tcd-dashboard-content {
        padding: 25px 15px;
    }
    
    .tcd-page-header {
        margin-bottom: 30px;
    }
    
    .tcd-dashboard-title {
        font-size: 1.8em;
    }
    
    .tcd-dashboard-subtitle {
        font-size: 1em;
    }
    
    .tcd-cards-container {
        gap: 20px;
    }
    
    .tcd-card {
        padding: 30px 20px;
    }
    
    .tcd-card-header {
        flex-direction: column;
        text-align: center;
        gap: 10px;
    }
    
    .tcd-card-icon {
        font-size: 2.5em;
    }
    
    .tcd-card-title {
        font-size: 1.4em;
    }
    
    .tcd-info-banner {
        padding: 25px 20px;
    }
    
    .tcd-info-grid {
        grid-template-columns: 1fr;
        gap: 20px;
    }
}

/* Small Mobile - Under 480px */
@media (max-width: 480px) {
    .tcd-container {
        padding: 0;
    }
    
    .tcd-verification-card {
        padding: 25px 20px;
        border-radius: 15px;
    }
    
    .tcd-verification-card h1 {
        font-size: 1.6em;
    }
    
    .tcd-header {
        padding: 12px 15px;
    }
    
    .tcd-header .tcd-logo-container img {
        max-width: 100px;
    }
    
    .tcd-dashboard-content {
        padding: 20px 10px;
    }
    
    .tcd-dashboard-title {
        font-size: 1.5em;
    }
    
    .tcd-dashboard-subtitle {
        font-size: 0.95em;
    }
    
    .tcd-card {
        padding: 25px 15px;
    }
    
    .tcd-card-title {
        font-size: 1.3em;
    }
    
    .tcd-card-btn {
        padding: 14px 20px;
        font-size: 0.85em;
    }
    
    .tcd-info-banner {
        padding: 20px 15px;
    }
    
    .tcd-info-banner-header h3 {
        font-size: 1.2em;
    }
}

/* Touch device optimizations */
@media (hover: none) and (pointer: coarse) {
    .tcd-btn,
    .tcd-card-btn,
    .tcd-logout-btn {
        min-height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
    }
    
    .tcd-form-group input {
        font-size: 16px; /* Prevents zoom on iOS */
    }
}

/* Language switcher */
.tc-lang-switcher {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: rgba(255, 255, 255, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.25);
    border-radius: 8px;
    padding: 3px;
    margin-left: 12px;
}

.tc-lang-btn {
    border: none;
    background: transparent;
    color: rgba(255, 255, 255, 0.75);
    font-size: 0.75rem;
    font-weight: 700;
    letter-spacing: 0.05em;
    padding: 6px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.2s, color 0.2s;
}

.tc-lang-btn:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.1);
}

.tc-lang-btn.active {
    background: #fff;
    color: #1e3a5f;
}

.tcd-verification-card .tc-lang-switcher,
.tcar-header .tc-lang-switcher,
.tcnu-header .tc-lang-switcher {
    position: absolute;
    top: 16px;
    right: 16px;
    background: #f1f5f9;
    border-color: #e2e8f0;
}

.tcd-verification-card .tc-lang-btn,
.tcar-header .tc-lang-btn,
.tcnu-header .tc-lang-btn {
    color: #64748b;
}

.tcd-verification-card .tc-lang-btn.active,
.tcar-header .tc-lang-btn.active,
.tcnu-header .tc-lang-btn.active {
    background: #1e3a5f;
    color: #fff;
}

.tcd-header .tc-lang-switcher {
    margin-left: 0;
    margin-right: 0;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    flex-shrink: 0;
}

.tcd-header .tc-lang-btn {
    color: #64748b;
}

.tcd-header .tc-lang-btn:hover {
    color: #334155;
    background: #e2e8f0;
}

.tcd-header .tc-lang-btn.active {
    background: #1e3a5f;
    color: #fff;
}

.tcd-user-info #tcdLangSwitcherDash {
    display: flex;
    align-items: center;
}

.tcar-header,
.tcnu-header,
.tcd-verification-card {
    position: relative;
}

/* Print styles */
@media print {
    .tcd-header,
    .tcd-logout-btn {
        display: none;
    }
    
    .tcd-dashboard-content {
        max-width: 100%;
    }
}
