/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* === LOGIN STYLES === */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    padding: 40px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.login-header {
    margin-bottom: 30px;
}

.login-header i {
    font-size: 3em;
    color: #667eea;
    margin-bottom: 10px;
    display: block;
}

.login-header h1 {
    font-size: 2em;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.login-header p {
    color: #666;
    font-size: 1.1em;
}

.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.input-wrapper i {
    position: absolute;
    left: 15px;
    color: #667eea;
    z-index: 1;
}

.input-wrapper input {
    width: 100%;
    padding: 15px 15px 15px 45px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    background: rgba(255, 255, 255, 0.9);
    transition: all 0.3s ease;
}

.input-wrapper input:focus {
    outline: none;
    border-color: #667eea;
    background: white;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.login-btn {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    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: 10px;
    margin-bottom: 20px;
}

.login-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
}

.login-btn:active {
    transform: translateY(0);
}

.login-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.error-message {
    color: #e74c3c;
    background: rgba(231, 76, 60, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid rgba(231, 76, 60, 0.2);
    font-size: 14px;
}

.success-message {
    color: #27ae60;
    background: rgba(39, 174, 96, 0.1);
    padding: 12px;
    border-radius: 8px;
    margin-top: 15px;
    border: 1px solid rgba(39, 174, 96, 0.2);
    font-size: 14px;
}

/* Version Info Styles */
.version-info {
    margin-top: 25px;
    padding: 15px;
    border-top: 1px solid rgba(102, 126, 234, 0.2);
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 10px;
}

.version-badge {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.3);
}

.build-date {
    color: #666;
    font-size: 11px;
    font-weight: 500;
    opacity: 0.8;
}

.login-footer {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #e1e5e9;
}

.demo-credentials {
    font-size: 14px;
    color: #666;
    line-height: 1.5;
}

.demo-credentials code {
    background: #f8f9fa;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: 'Courier New', monospace;
    color: #667eea;
    font-weight: bold;
}

/* === DASHBOARD STYLES === */
.dashboard {
    min-height: 100vh;
    background: #f5f7fa;
    display: flex;
    flex-direction: column;
}

.dashboard-header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 0;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.header-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 15px;
}

.header-left i {
    font-size: 2em;
}

.header-left h1 {
    font-size: 1.8em;
    font-weight: 600;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.1em;
}

.user-info i {
    font-size: 1.5em;
}

.logout-btn {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.logout-btn:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
}

.dashboard-main {
    max-width: 1200px;
    margin: 0 auto;
    padding: 30px 20px;
    display: grid;
    gap: 30px;
    flex: 1;
}

/* Cards */
.welcome-card,
.download-card,
.activity-card,
.services-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.08);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.welcome-section h2 {
    font-size: 2.2em;
    margin-bottom: 10px;
    color: #333;
    font-weight: 600;
}

.welcome-section p {
    font-size: 1.2em;
    color: #666;
    margin-bottom: 30px;
}

.quick-actions {
    display: flex;
    gap: 15px;
    margin-bottom: 30px;
    flex-wrap: wrap;
}

.action-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    font-size: 14px;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fc 0%, #f1f3f8 100%);
    border-radius: 12px;
    border-left: 4px solid #667eea;
}

.stat-item i {
    font-size: 2em;
    color: #667eea;
}

.stat-number {
    display: block;
    font-size: 1.8em;
    font-weight: bold;
    color: #333;
}

.stat-label {
    display: block;
    color: #666;
    font-size: 0.9em;
}

/* Download Section */
.card-header {
    margin-bottom: 30px;
}

.card-header h3 {
    font-size: 1.8em;
    margin-bottom: 10px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    color: #667eea;
}

.card-header p {
    color: #666;
    font-size: 1.1em;
}

.download-list {
    display: grid;
    gap: 20px;
}

.download-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 25px;
    background: #f8f9fc;
    border-radius: 12px;
    border: 2px solid #e1e5e9;
    transition: all 0.3s ease;
}

.download-item:hover {
    border-color: #667eea;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.1);
}

.download-info {
    flex: 1;
}

.download-info h4 {
    font-size: 1.3em;
    margin-bottom: 8px;
    color: #333;
}

.download-info p {
    color: #666;
    margin-bottom: 10px;
}

.file-size {
    color: #888;
    font-size: 0.9em;
}

.download-btn {
    padding: 12px 24px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    white-space: nowrap;
}

.download-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.download-btn:disabled {
    background: #95a5a6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Activity Section */
.activity-card h3 {
    font-size: 1.8em;
    margin-bottom: 25px;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.activity-card h3 i {
    color: #667eea;
}

.chart-placeholder {
    text-align: center;
    padding: 40px;
    background: #f8f9fc;
    border-radius: 12px;
    border: 2px dashed #e1e5e9;
}

.chart-placeholder i {
    font-size: 3em;
    color: #667eea;
    margin-bottom: 15px;
}

.chart-placeholder p {
    color: #666;
    margin-bottom: 20px;
}

.chart-bars {
    display: flex;
    gap: 10px;
    justify-content: center;
    align-items: end;
    height: 100px;
}

.chart-bar {
    width: 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 4px 4px 0 0;
    transition: all 0.3s ease;
    position: relative;
}

.chart-bar:hover {
    filter: brightness(1.1);
}

.chart-bar:hover::after {
    content: attr(title);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    white-space: nowrap;
}

/* Services Section */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.service-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: #f8f9fc;
    border-radius: 12px;
    position: relative;
    transition: all 0.3s ease;
}

.service-item.active {
    background: linear-gradient(135deg, #e8f4fd 0%, #e1f5fe 100%);
    border: 2px solid #667eea;
}

.service-item.inactive {
    background: #f0f0f0;
    border: 2px solid #ddd;
}

.service-item i {
    font-size: 1.5em;
    color: #667eea;
}

.service-item.inactive i {
    color: #95a5a6;
}

.service-item span {
    font-weight: 600;
    color: #333;
}

.service-item.inactive span {
    color: #666;
}

.status-indicator {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #27ae60;
}

.service-item.warning .status-indicator {
    background: #f39c12;
}

.service-item.error .status-indicator {
    background: #e74c3c;
}

.service-item.inactive .status-indicator {
    background: #95a5a6;
}

/* Modal Styles */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal-content {
    background: white;
    border-radius: 16px;
    padding: 30px;
    width: 100%;
    max-width: 500px;
    max-height: 90vh;
    overflow-y: auto;
    position: relative;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e1e5e9;
}

.modal-header h2 {
    font-size: 1.5em;
    color: #333;
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h2 i {
    color: #667eea;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5em;
    cursor: pointer;
    color: #666;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    transition: all 0.3s ease;
}

.modal-close:hover {
    background: #f1f1f1;
    color: #333;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #333;
    font-weight: 600;
}

.password-requirements {
    margin: 20px 0;
    padding: 15px;
    background: #f8f9fc;
    border-radius: 8px;
    border-left: 4px solid #667eea;
}

.password-requirements h4 {
    margin-bottom: 10px;
    color: #333;
    font-size: 0.9em;
}

.password-requirements ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.password-requirements li {
    margin-bottom: 5px;
    font-size: 0.85em;
    color: #666;
    display: flex;
    align-items: center;
}

.password-requirements li.valid {
    color: #27ae60;
}

.password-requirements li.invalid {
    color: #e74c3c;
}

.modal-actions {
    display: flex;
    gap: 15px;
    justify-content: flex-end;
    margin-top: 25px;
}

.btn-cancel,
.btn-confirm {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-cancel {
    background: #95a5a6;
    color: white;
}

.btn-cancel:hover {
    background: #7f8c8d;
}

.btn-confirm {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-confirm:hover:not(:disabled) {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-confirm:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Dashboard Footer Styles */
.dashboard-footer {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(0, 0, 0, 0.1);
    padding: 15px 0;
    margin-top: auto;
}

.version-footer {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    flex-wrap: wrap;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.version-footer .copyright {
    color: #666;
    font-size: 12px;
    font-weight: 400;
}

/* Responsive */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 15px;
        text-align: center;
    }

    .dashboard-main {
        padding: 20px 15px;
    }

    .welcome-card,
    .download-card,
    .activity-card,
    .services-card {
        padding: 20px;
    }

    .download-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .download-info {
        width: 100%;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .services-grid {
        grid-template-columns: 1fr;
    }

    .quick-actions {
        justify-content: center;
    }

    .modal-actions {
        flex-direction: column;
    }

    .version-footer {
        flex-direction: column;
        gap: 8px;
        text-align: center;
    }
    
    .version-footer .copyright {
        order: 3;
    }
}

@media (max-width: 480px) {
    .login-card {
        padding: 30px 20px;
    }

    .download-item {
        padding: 20px;
    }

    .modal-content {
        padding: 20px;
        margin: 10px;
    }

    .stat-item {
        flex-direction: column;
        text-align: center;
    }
}