:root {
    --bg-color: #FFFFFF;
    --card-bg: #FFFFFF;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --accent-blue: #000000;
    --input-bg: #FFFFFF;
    --input-border: #CBD5E1;
    --success-green: #10B981;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Inter', sans-serif;
}

body {
    background-color: var(--bg-color);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-primary);
    -webkit-user-select: none;
    /* Safari */
    -ms-user-select: none;
    /* IE 10 and IE 11 */
    user-select: none;
    /* Standard syntax */
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background-color: var(--card-bg);
    border-radius: 24px;
    padding: 40px 30px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    border: 1px solid #1E293B;
    text-align: center;
}

.logo-container {
    margin-bottom: 24px;
    display: flex;
    justify-content: center;
}

.logo-icon {
    width: 70px;
    height: 70px;
    background-color: white;
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.welcome-title {
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.welcome-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
    margin-bottom: 32px;
}

.input-group {
    text-align: left;
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
}

.password-wrapper {
    position: relative;
}

.password-wrapper input {
    width: 100%;
    background-color: var(--input-bg);
    border: 1px solid var(--input-border);
    border-radius: 12px;
    padding: 14px 16px;
    padding-right: 45px;
    color: var(--text-primary);
    font-size: 15px;
    outline: none;
    transition: border-color 0.2s;
}

.password-wrapper input:focus {
    border-color: var(--accent-blue);
}

.password-wrapper input::placeholder {
    color: #475569;
}

.toggle-password {
    position: absolute;
    right: 14px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}



.sign-in-btn {
    width: 100%;
    background-color: var(--accent-blue);
    color: white;
    border: none;
    border-radius: 30px;
    padding: 14px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

.sign-in-btn:hover {
    background-color: #333333;
}

.divider {
    height: 1px;
    background-color: #1E293B;
    margin: 24px 0;
}

.secure-login {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background-color: #064E3B;
    /* Dark green background */
    color: var(--success-green);
    padding: 6px 16px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.secure-icon {
    display: flex;
    align-items: center;
}

.top-left-logo {
    position: absolute;
    top: 20px;
    left: 20px;
    width: 60px;
    height: auto;
    z-index: 10;
}

/* Form Styles */
.main-container {
    max-width: 800px;
    margin: 100px auto 60px;
    /* Increased top margin */
    padding: 0 20px;
}

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

.form-header h1 {
    font-size: 32px;
    /* Larger title */
    font-weight: 700;
    color: #0f172a;
    /* Darker slate */
    letter-spacing: -0.5px;
}

.back-link {
    color: #64748b;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: color 0.2s;
}

.back-link:hover {
    color: #0f172a;
}

.client-form {
    background: white;
    border-radius: 24px;
    /* Larger radius */
    padding: 48px;
    /* More padding */
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    /* Premium shadow */
    border: 1px solid #f1f5f9;
}

.form-section {
    margin-bottom: 40px;
    padding-bottom: 30px;
    border-bottom: 1px solid #f1f5f9;
    /* Lighter border */
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section h2 {
    font-size: 18px;
    font-weight: 600;
    color: #0f172a;
    margin-bottom: 24px;
    letter-spacing: -0.01em;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 24px;
    /* Increased gap */
    margin-bottom: 24px;
}

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

.form-group label {
    display: block;
    font-size: 13px;
    /* Slightly smaller, more refined */
    font-weight: 600;
    color: #475569;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 14px 18px;
    /* More padding */
    border-radius: 12px;
    /* Smoother corners */
    border: 1px solid #e2e8f0;
    background-color: #ffffff;
    /* White bg */
    color: #0f172a;
    font-size: 15px;
    outline: none;
    transition: all 0.2s ease;
    font-family: 'Inter', sans-serif;
    box-shadow: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: #000000;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
    /* Subtle ring */
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: #94a3b8;
}

.form-group textarea {
    resize: vertical;
    min-height: 100px;
}

.form-actions {
    display: flex;
    gap: 16px;
    margin-top: 40px;
    padding-top: 20px;
    justify-content: flex-end;
}

.btn-primary {
    background-color: #0f172a;
    color: white;
    border: none;
    padding: 16px 32px;
    /* Larger button */
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.btn-primary:hover {
    background-color: #000000;
    transform: translateY(-1px);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.btn-secondary {
    background-color: white;
    color: #475569;
    border: 1px solid #e2e8f0;
    padding: 16px 32px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 15px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

@media (max-width: 640px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .client-form {
        padding: 24px;
    }

    .main-container {
        margin-top: 80px;
    }
}

/* Client List Styles */
.client-list-container {
    background: white;
    border-radius: 24px;
    padding: 32px;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    border: 1px solid #f1f5f9;
}

.list-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.search-bar {
    padding: 12px 20px;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
    width: 300px;
    font-size: 14px;
    outline: none;
    transition: all 0.2s;
}

.search-bar:focus {
    border-color: #000000;
    box-shadow: 0 0 0 4px rgba(0, 0, 0, 0.05);
}

.small-btn {
    padding: 10px 20px;
    font-size: 14px;
    text-decoration: none;
}

.table-responsive {
    overflow-x: auto;
}

.client-table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    min-width: 800px;
    /* Force scroll on small screens */
}

.client-table th {
    text-align: left;
    padding: 16px;
    font-size: 13px;
    font-weight: 600;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid #e2e8f0;
}

.client-table td {
    padding: 20px 16px;
    font-size: 14px;
    color: #0f172a;
    border-bottom: 1px solid #f1f5f9;
    vertical-align: middle;
}

.client-table tr:last-child td {
    border-bottom: none;
}

.status-badge {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-badge.active {
    background-color: #dcfce7;
    color: #166534;
}

.status-badge.lead {
    background-color: #dbeafe;
    color: #1e40af;
}

.btn-icon {
    background: none;
    border: 1px solid #e2e8f0;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    color: #475569;
    transition: all 0.2s;
}

.btn-icon:hover {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
}

/* Leads Table Styles */
.leads-table-container {
    margin-top: 40px;
    background: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    overflow-x: auto;
}

.leads-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 1000px;
}

.leads-table th,
.leads-table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
    font-size: 14px;
}

.leads-table th {
    background-color: #f8fafc;
    font-weight: 600;
    color: #1e293b;
}

.leads-table tr:last-child td {
    border-bottom: none;
}

.hidden {
    display: none;
}

/* Dashboard Actions */
.dashboard-actions {
    margin-top: 32px;
    display: flex;
    gap: 16px;
    justify-content: center;
    flex-wrap: wrap;
}

.action-btn {
    text-decoration: none;
    display: inline-block;
    white-space: nowrap;
}

.secondary-btn {
    background-color: white;
    color: #1e293b;
    border: 1px solid #cbd5e1;
}

.secondary-btn:hover {
    background-color: #f8fafc;
    color: #0f172a;
    border-color: #cbd5e1;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .main-container {
        margin: 80px auto 40px;
        padding: 0 16px;
        width: 100%;
        /* Ensure full width */
    }

    .form-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .form-header h1 {
        font-size: 24px;
    }

    .client-form,
    .client-list-container,
    .leads-table-container {
        padding: 20px;
        /* Reduced padding */
        width: 100%;
        /* Ensure full width */
        border-radius: 16px;
        /* Slightly smaller radius */
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .list-actions {
        flex-direction: column;
        gap: 16px;
        align-items: stretch;
    }

    .search-bar {
        width: 100%;
    }

    .small-btn {
        width: 100%;
        text-align: center;
    }

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

    .action-btn {
        width: 100%;
        text-align: center;
    }

    .login-card {
        padding: 30px 20px;
    }

    /* Ensure tables scroll */
    .table-responsive,
    .leads-table-container {
        display: block;
        width: 100%;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        /* Smooth scroll on iOS */
    }
}

@media (max-width: 480px) {
    .welcome-title {
        font-size: 24px;
    }

    .btn-primary,
    .btn-secondary {
        padding: 14px 20px;
        font-size: 14px;
    }
}