/* WTF IA - Tech & Automation Theme */
:root {
    --primary-color: #00C2FF; /* Cyan tech */
    --secondary-color: #07123B; /* Deep navy */
    --accent-color: #7C3AED; /* Violet accent */
    --background-dark: #0A0F1A;
    --background-light: #071230;
    --text-primary: #E6F7FF;
    --text-secondary: #AEBED4;
    --border-color: rgba(255,255,255,0.06);
    --success-color: #2DD4BF;
    --danger-color: #FF6B6B;
}

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

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: radial-gradient(1200px 600px at 10% 10%, rgba(0,194,255,0.05), transparent),
                linear-gradient(180deg, var(--background-dark) 0%, var(--background-light) 100%);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
}

.stars {
    /* subtle animated circuit-like background */
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px),
                      linear-gradient(180deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 60px 60px, 60px 60px;
    opacity: 0.6;
    pointer-events: none;
    z-index: -1;
    animation: float 20s linear infinite;
}

@keyframes float {
    from { transform: translateY(0); }
    to { transform: translateY(-8px); }
}

.star {
    position: absolute;
    background: white;
    border-radius: 50%;
    animation: twinkle 2s infinite;
}

.star:nth-child(odd) {
    animation-delay: -1s;
}

@keyframes twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

/* Header */
.header {
    background: linear-gradient(90deg, #000000 0%, #1A1A1A 50%, #000000 100%);
    padding: 1rem 2rem;
    border-bottom: 2px solid var(--primary-color);
    box-shadow: 0 0 20px rgba(255, 232, 31, 0.3);
}

.header h1 {
    color: var(--primary-color);
    font-size: 2.5rem;
    text-align: center;
    text-shadow: 0 0 10px var(--primary-color);
    font-weight: bold;
}

/* Login/Register Forms */
.auth-container {
    max-width: 400px;
    margin: 5rem auto;
    padding: 2rem;
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    box-shadow: 0 0 30px rgba(255, 232, 31, 0.3);
}

.auth-container h2 {
    color: var(--primary-color);
    text-align: center;
    margin-bottom: 2rem;
    font-size: 2rem;
    text-shadow: 0 0 10px var(--primary-color);
}

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

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

.form-group input {
    width: 100%;
    padding: 0.75rem;
    background: var(--background-light);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

.form-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 232, 31, 0.5);
    outline: none;
}

.btn {
    width: 100%;
    padding: 0.75rem;
    background: linear-gradient(45deg, var(--primary-color), #FFD700);
    border: none;
    border-radius: 5px;
    color: #000;
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 232, 31, 0.4);
}

.btn-danger {
    background: linear-gradient(45deg, var(--danger-color), #FF6666);
    color: white;
}

.btn-success {
    background: linear-gradient(45deg, var(--success-color), #66FF66);
    color: black;
}

/* Dashboard */
.dashboard {
    padding: 2rem;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding: 1rem;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
}

.welcome-message {
    color: var(--primary-color);
    font-size: 1.5rem;
    text-shadow: 0 0 10px var(--primary-color);
}

.logout-btn {
    background: var(--danger-color);
    color: white;
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: bold;
    text-transform: uppercase;
}

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

/* Cards */
.card {
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    box-shadow: 0 0 20px rgba(255, 232, 31, 0.2);
}

.card h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-shadow: 0 0 10px var(--primary-color);
}

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

.stat-card {
    text-align: center;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: bold;
    color: var(--primary-color);
    text-shadow: 0 0 10px var(--primary-color);
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-top: 0.5rem;
}

/* Tables */
.table-container {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(0, 0, 0, 0.8);
    border: 1px solid var(--primary-color);
    border-radius: 10px;
    overflow: hidden;
}

th, td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

th {
    background: var(--primary-color);
    color: #000;
    font-weight: bold;
    text-transform: uppercase;
    letter-spacing: 1px;
}

tbody tr:hover {
    background: rgba(255, 232, 31, 0.1);
}

.status-active {
    color: var(--success-color);
    font-weight: bold;
}

.status-inactive {
    color: var(--danger-color);
    font-weight: bold;
}

.status-suspended {
    color: #FFA500;
    font-weight: bold;
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    z-index: 1000;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: var(--background-light);
    padding: 2rem;
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    box-shadow: 0 0 50px rgba(255, 232, 31, 0.5);
}

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

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    font-weight: bold;
}

.alert-success {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

/* Responsive */
@media (max-width: 768px) {
    .header h1 {
        font-size: 2rem;
    }

    .auth-container {
        margin: 2rem auto;
        padding: 1rem;
    }

    .dashboard {
        padding: 1rem;
    }

    .card-grid {
        grid-template-columns: 1fr;
    }
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 232, 31, 0.3);
    border-radius: 50%;
    border-top-color: var(--primary-color);
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Minimal homepage styles */
.minimal-home { font-family: Inter, system-ui, Arial, sans-serif; }
.hero {
    display:flex;
    flex-direction:row;
    align-items:center;
    justify-content:space-between;
    padding:5vw;
    gap:2rem;
}
.hero-content h1{font-size:3rem;color:var(--text-primary);margin:0;font-weight:700}
.hero-content .subtitle{color:var(--text-secondary);margin-top:0.5rem}
.hero-robot{width:360px;height:360px}

.login-corner{position:fixed;top:18px;right:18px;padding:8px 12px;border-radius:6px;background:rgba(255,255,255,0.06);color:var(--text-primary);text-decoration:none;font-weight:600;opacity:0.9}

/* Provider form */
.provider-form-page{max-width:900px;margin:4rem auto;padding:2rem;background:rgba(255,255,255,0.02);border-radius:8px}
.provider-form-page h2{color:var(--text-primary)}
.provider-form-page .form-group{margin-bottom:1rem}
.provider-form-page input, .provider-form-page textarea{width:100%;padding:10px;border-radius:6px;border:1px solid var(--border-color);background:transparent;color:var(--text-primary)}
.provider-form-page .btn{width:auto;padding:10px 18px}

/* keep existing login/register card rules for compatibility */
.container { display:flex; justify-content:center; align-items:center; min-height:100vh; padding:2rem; }
.login-card, .register-card { background: rgba(0,0,0,0.9); border: 2px solid var(--primary-color); border-radius: 15px; padding: 3rem; width:100%; max-width:500px; backdrop-filter: blur(10px); }

.form-row .form-group {
    flex: 1;
}

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

input[type="text"], input[type="email"], input[type="password"] {
    width: 100%;
    padding: 0.8rem;
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: var(--text-primary);
    font-size: 1rem;
    transition: all 0.3s ease;
}

input[type="text"]:focus, input[type="email"]:focus, input[type="password"]:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 10px rgba(255, 232, 31, 0.3);
    outline: none;
}

.btn {
    width: 100%;
    padding: 1rem;
    background: linear-gradient(45deg, var(--primary-color), #FFD700);
    border: none;
    border-radius: 5px;
    color: var(--secondary-color);
    font-size: 1.1rem;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(255, 232, 31, 0.5);
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.btn-text {
    position: relative;
    z-index: 1;
}

.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 2px solid var(--secondary-color);
    border-radius: 50%;
    border-top-color: transparent;
    animation: spin 1s linear infinite;
    margin-right: 0.5rem;
}

.register-link, .login-link {
    text-align: center;
    margin-top: 1.5rem;
}

.register-link a, .login-link a {
    color: var(--primary-color);
    text-decoration: none;
    font-weight: bold;
}

.register-link a:hover, .login-link a:hover {
    text-shadow: 0 0 10px var(--primary-color);
}

.alert {
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    text-align: center;
    font-weight: bold;
}

.alert-success {
    background: rgba(0, 255, 0, 0.2);
    border: 1px solid var(--success-color);
    color: var(--success-color);
}

.alert-error {
    background: rgba(255, 68, 68, 0.2);
    border: 1px solid var(--danger-color);
    color: var(--danger-color);
}

/* reCAPTCHA styling */
.g-recaptcha {
    display: flex;
    justify-content: center;
    margin: 1rem 0;
}

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

.welcome-section {
    text-align: center;
    margin-bottom: 3rem;
}

.welcome-section h2 {
    color: var(--primary-color);
    font-size: 2.5rem;
    text-shadow: 0 0 15px var(--primary-color);
    margin-bottom: 1rem;
}

.welcome-section p {
    color: var(--text-secondary);
    font-size: 1.2rem;
}

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

.dashboard-card {
    background: rgba(0, 0, 0, 0.8);
    border: 2px solid var(--primary-color);
    border-radius: 10px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s ease;
    box-shadow: 0 0 20px rgba(255, 232, 31, 0.2);
}

.dashboard-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(255, 232, 31, 0.4);
}

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

.dashboard-card p {
    color: var(--text-secondary);
    margin-bottom: 1.5rem;
}

.btn-secondary {
    background: linear-gradient(45deg, var(--text-secondary), #666);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: linear-gradient(45deg, #666, var(--text-secondary));
}

/* Dashboard Styles */
.dashboard {
    background: rgba(0, 0, 0, 0.9);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    width: 100%;
    max-width: 1400px;
    box-shadow: 0 0 40px rgba(255, 232, 31, 0.4);
    backdrop-filter: blur(10px);
}

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

.dashboard-header .logo h1 {
    font-size: 2rem;
}

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

.actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
}

.customer-form {
    background: rgba(26, 26, 26, 0.8);
    border: 1px solid var(--border-color);
    border-radius: 10px;
    padding: 2rem;
    margin-bottom: 2rem;
}

.customer-form h3 {
    color: var(--primary-color);
    margin-bottom: 1.5rem;
    text-align: center;
}

.form-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
    margin-top: 1.5rem;
}

.customers-list h3 {
    color: var(--primary-color);
    margin-bottom: 1rem;
}

.customers-table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(26, 26, 26, 0.8);
    border-radius: 10px;
    overflow: hidden;
}

.customers-table th,
.customers-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}

.customers-table th {
    background: var(--background-dark);
    color: var(--primary-color);
    font-weight: bold;
}

.customers-table tr:hover {
    background: rgba(255, 232, 31, 0.1);
}

.status {
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    font-size: 0.875rem;
    font-weight: bold;
}

.status-active {
    background: var(--success-color);
    color: black;
}

.status-inactive {
    background: var(--text-secondary);
    color: white;
}

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

.actions {
    display: flex;
    gap: 0.5rem;
}

.btn-icon {
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0.25rem;
    border-radius: 4px;
    transition: background 0.3s;
}

.btn-icon:hover {
    background: rgba(255, 232, 31, 0.2);
}

.loading, .error, .empty {
    text-align: center;
    padding: 2rem;
    color: var(--text-secondary);
}

.error {
    color: var(--danger-color);
}

.empty {
    color: var(--text-primary);
}

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

.modal-content {
    background: var(--background-dark);
    border: 2px solid var(--primary-color);
    border-radius: 15px;
    padding: 2rem;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 0 40px rgba(255, 232, 31, 0.4);
}

.modal-content h4 {
    color: var(--primary-color);
    margin-bottom: 1rem;
    text-align: center;
}

.modal-content p {
    margin-bottom: 1.5rem;
    text-align: center;
}

.modal-actions {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

.btn-danger {
    background: linear-gradient(45deg, var(--danger-color), #ff6666);
}

.btn-danger:hover {
    background: linear-gradient(45deg, #ff6666, var(--danger-color));
}

/* Responsive */
@media (max-width: 768px) {
    .dashboard {
        padding: 1rem;
    }

    .dashboard-header {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }

    .actions {
        flex-direction: column;
    }

    .form-row {
        flex-direction: column;
    }

    .customers-table {
        font-size: 0.875rem;
    }

    .customers-table th,
    .customers-table td {
        padding: 0.5rem;
    }

    .actions {
        flex-direction: column;
        align-items: center;
    }
}