/* FreshPC Cloud - Main Stylesheet */
:root {
    --primary-color: #667eea;
    --primary-hover: #5a67d8;
    --secondary-color: #764ba2;
    --success-color: #48bb78;
    --warning-color: #ed8936;
    --danger-color: #f56565;
    --background: #f7fafc;
    --surface: #ffffff;
    --text-primary: #2d3748;
    --text-secondary: #718096;
    --border: #e2e8f0;
    --shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

/* Utility Classes */
.hidden {
    display: none !important;
}

.section-spacing {
    margin-top: 2rem;
}

.form-spacing {
    margin-top: 2rem;
}

.client-list-spacing {
    margin-bottom: 2rem;
}

.report-result-spacing {
    margin-top: 2rem;
}

/* Dynamic Configuration Styles */
:root {
    --bg-color: #f7fafc;
    --text-color: #2d3748;
    --header-bg-color: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    --header-text-color: #ffffff;
    --hover-color: #667eea;
    --font-weight: 400;
    --btn-primary: #667eea;
    --btn-success: #48bb78;
    --btn-warning: #ed8936;
    --btn-danger: #f56565;
    --btn-info: #667eea;
    --btn-secondary: #718096;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    font-weight: var(--font-weight);
}

.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%) !important;
    color: var(--header-text-color) !important;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
}

.header h1, .header h2, .header h3 {
    color: var(--header-text-color) !important;
}

.logo {
    height: 32px;
    margin-right: 10px;
    vertical-align: middle;
}

.site-title {
    display: inline-block;
    vertical-align: middle;
    margin: 0;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background-color: var(--background);
}

/* Navigation */
.navbar {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.nav-logo h2 {
    color: white;
    font-size: 1.5rem;
}

.nav-logo span {
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.9rem;
}

.nav-menu {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.nav-role {
    background: rgba(255, 255, 255, 0.2);
    color: white;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
    font-size: 0.9rem;
    font-weight: 500;
}

.nav-link {
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s;
    opacity: 0.9;
}

/* Override for header navbar to ensure white text on dark background */
.header .nav-link {
    color: var(--header-text-color) !important;
}

.header .site-title {
    color: var(--header-text-color) !important;
}

.nav-link:hover {
    opacity: 1;
    color: white;
    transform: translateY(-1px);
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 0.5rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.2s;
    font-size: 0.9rem;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
}

.btn-primary:hover {
    background: var(--primary-hover);
}

.btn-secondary {
    background: var(--secondary-color);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
}

.btn-outline:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: var(--danger-color);
    color: white;
}

.btn-danger:hover {
    background: #e53e3e;
}

.btn-success {
    background: var(--success-color);
    color: white;
}

/* Hero Section */
.hero {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    padding: 4rem 2rem;
    text-align: center;
}

.hero-content h1 {
    font-size: 3rem;
    margin-bottom: 1rem;
    font-weight: 700;
}

.hero-content p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* Container */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

/* Services */
.services {
    padding: 4rem 0;
}

.services h2 {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.service-card {
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
}

.service-card:hover {
    transform: translateY(-2px);
}

.service-card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    font-size: 1.3rem;
}

/* Contact */
.contact {
    background: var(--surface);
    padding: 4rem 0;
    text-align: center;
}

.contact h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.contact-info {
    margin-top: 2rem;
}

.contact-info a {
    color: var(--primary-color);
    text-decoration: none;
}

/* Footer */
footer {
    background: var(--text-primary);
    color: white;
    padding: 2rem 0;
    text-align: center;
}

/* Admin/Engineer Dashboard */
.admin-container, .engineer-container {
    min-height: 100vh;
    background: var(--background);
}

.admin-header, .engineer-header {
    background: var(--surface);
    padding: 1rem 2rem;
    box-shadow: var(--shadow);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

/* Login Form */
.login-form {
    max-width: 400px;
    margin: 4rem auto;
    background: var(--surface);
    padding: 2rem;
    border-radius: 1rem;
    box-shadow: var(--shadow);
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--primary-color);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: var(--text-primary);
}

.form-group input, .form-group select, .form-group textarea {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid var(--border);
    border-radius: 0.5rem;
    font-size: 1rem;
    transition: border-color 0.2s;
}

.form-group input:focus, .form-group select:focus, .form-group textarea:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Dashboard Navigation */
.admin-nav, .engineer-nav {
    background: var(--surface);
    padding: 1rem 2rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    gap: 1rem;
}

.nav-btn {
    padding: 1rem 2rem;
    border: none;
    background: linear-gradient(135deg, #f8fafc, #e2e8f0);
    color: var(--text-secondary);
    font-weight: 600;
    cursor: pointer;
    border-radius: 0.75rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
    position: relative;
    overflow: hidden;
}

.nav-btn:hover {
    background: linear-gradient(135deg, #e2e8f0, #cbd5e1);
    color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.nav-btn.active {
    background: linear-gradient(135deg, var(--primary-color), var(--primary-hover));
    color: white;
    box-shadow: 0 4px 16px rgba(37, 99, 235, 0.3);
}

.nav-btn.active:hover {
    background: linear-gradient(135deg, var(--primary-hover), #1e40af);
}

/* Content Sections */
.admin-content, .engineer-content {
    padding: 2rem;
}

.content-section {
    background: var(--surface);
    border-radius: 1rem;
    padding: 2rem;
    box-shadow: var(--shadow);
}

.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

/* Forms */
.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

.form-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1.5rem;
}

.task-form {
    background: var(--background);
    padding: 2rem;
    border-radius: 1rem;
    margin-bottom: 2rem;
}

/* Task Lists */
.tasks-list {
    display: grid;
    gap: 1rem;
}

.task-item {
    background: var(--background);
    padding: 1.5rem;
    border-radius: 0.5rem;
    border-left: 4px solid var(--primary-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.task-info h4 {
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.task-info p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.task-meta {
    display: flex;
    gap: 1rem;
    align-items: center;
    font-size: 0.8rem;
    color: var(--text-secondary);
}

.status-badge {
    padding: 0.25rem 0.75rem;
    border-radius: 1rem;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
}

.status-pending { background: var(--warning-color); color: white; }
.status-in_progress { background: var(--primary-color); color: white; }
.status-completed { background: var(--success-color); color: white; }

/* Modal */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: var(--surface);
    border-radius: 1rem;
    max-width: 600px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-body {
    padding: 1.5rem;
}

.close-btn {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-secondary);
}

/* Reports */
.reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.report-card {
    background: var(--background);
    padding: 2rem;
    border-radius: 1rem;
}

.stat-item {
    display: flex;
    justify-content: space-between;
    margin-bottom: 1rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.stat-value {
    font-weight: 700;
    color: var(--primary-color);
}

/* Responsive */
@media (max-width: 768px) {
    .hero-content h1 {
        font-size: 2rem;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .hero-buttons {
        flex-direction: column;
        align-items: center;
    }
    
    .nav-menu {
        flex-direction: column;
        gap: 1rem;
    }
    
    .admin-nav, .engineer-nav {
        flex-wrap: wrap;
    }
}
/* Authentication Logs Styling */
.logs-container {
    background: white;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.logs-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.logs-info {
    color: #666;
    font-size: 14px;
}

.logs-content {
    max-height: 500px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 10px;
}

.log-entry {
    padding: 8px 12px;
    margin-bottom: 5px;
    border-radius: 4px;
    font-family: monospace;
    font-size: 13px;
    border-left: 4px solid;
}

.log-success {
    background-color: #f0f9ff;
    border-left-color: #22c55e;
    color: #166534;
}

.log-failed {
    background-color: #fef2f2;
    border-left-color: #ef4444;
    color: #991b1b;
}

/* Login Page Styles */
.login-main {
    width: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.login-form-container {
    width: 100%;
    max-width: 500px;
}

.login-header {
    text-align: center;
    margin-bottom: 2rem;
}

.login-header .logo {
    height: 48px;
    margin-bottom: 10px;
}

.password-input-group {
    position: relative;
    display: flex;
}

.password-input-group input {
    flex: 1;
    padding-right: 4rem;
}

.btn-password-toggle {
    position: absolute;
    right: 0;
    top: 0;
    bottom: 0;
    padding: 0 1rem;
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 0.9rem;
}

.btn-password-toggle:hover {
    color: var(--primary-color);
}

.btn-block {
    width: 100%;
}

.form-footer {
    margin-top: 1rem;
    text-align: center;
}

.forgot-password {
    text-align: center;
    margin-top: 1rem;
}

.forgot-password a {
    color: var(--primary-color);
    text-decoration: none;
}

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


/* 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;
}

.modal.hidden {
    display: none;
}

.modal-content {
    background: white;
    padding: 2rem;
    border-radius: 0.5rem;
    width: 90%;
    max-width: 400px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.task-actions .btn {
    margin-bottom: 0.25rem;
}
