:root {
    --bg-dark: #000000;
    --bg-gradient: #000000;
    /* Pure Black */
    --card-bg: rgba(20, 20, 20, 0.6);
    --card-border: rgba(255, 255, 255, 0.08);
    /* Slightly more visible border for contrast */
    --text-primary: #ededed;
    /* Off-white for better readability on black */
    --text-secondary: #a1a1a1;
    --accent-color: #ffffff;
    /* White accent for monochrome minimal look */
    --accent-gradient: linear-gradient(135deg, #ffffff 0%, #d4d4d4 100%);
    --danger-color: #ff3b30;
    --success-color: #34c759;
    --font-main: 'Outfit', sans-serif;
}

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

body {
    font-family: var(--font-main);
    background: var(--bg-dark);
    color: var(--text-primary);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
}

/* Typography */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

h1.page-title,
h2.page-title {
    font-size: 1.8rem;
    font-weight: 700;
    letter-spacing: -0.5px;
    background: none;
    -webkit-background-clip: unset;
    -webkit-text-fill-color: var(--text-primary);
    color: var(--text-primary);
    display: inline-block;
}

a {
    text-decoration: none;
    color: inherit;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

.container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 2rem;
}

/* Minimalist Cards */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(10px);
    /* Lower blur for sharper feel */
    border-radius: 0.75rem;
    /* Slightly tighter radius */
    padding: 2rem;
    box-shadow: none;
    /* No shadow for flat minimal look */
    transition: border-color 0.2s ease;
}

.glass-card:hover {
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.6rem 1.2rem;
    border-radius: 0.5rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    font-size: 0.9rem;
}

.primary-btn {
    background: var(--text-primary);
    color: black;
    border: 1px solid var(--text-primary);
}

.primary-btn:hover {
    background: #d4d4d4;
    transform: none;
    box-shadow: none;
}

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

.secondary-btn:hover {
    border-color: var(--text-primary);
    color: var(--text-primary);
    background: transparent;
}

.danger-btn {
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.3);
    color: var(--danger-color);
}

.danger-btn:hover {
    background: rgba(255, 59, 48, 0.2);
    color: var(--danger-color);
}

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

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
    /* Much lighter for better visibility */
    font-size: 0.9rem;
    font-weight: 600;
}

.form-control,
.form-input,
select.form-control {
    width: 100%;
    padding: 0.8rem 1rem;
    background: #3d3d3d;
    /* Distinct gray for high visibility */
    border: 1px solid rgba(255, 255, 255, 0.4);
    /* clearer border */
    border-radius: 0.5rem;
    color: #ffffff;
    font-family: var(--font-main);
    font-size: 1rem;
    /* Slightly larger text */
    transition: all 0.2s ease;
}

.form-control:focus,
.form-input:focus {
    outline: none;
    border-color: #ffffff;
    background: #ffffff;
    /* White background on focus for max visibility */
    color: #000000;
    /* Black text on focus */
    box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.3);
}

/* Force hide seconds in time inputs for Webkit browsers */
input[type="time"]::-webkit-datetime-edit-second-field {
    display: none !important;
}

input[type="time"]::-webkit-datetime-edit-minute-field {
    /* Ensure minutes are visible */
}

/* Autocomplete/Autofill Fix for Dark Mode */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
input:-webkit-autofill:active {
    -webkit-box-shadow: 0 0 0 30px #3d3d3d inset !important;
    /* Match input bg */
    -webkit-text-fill-color: white !important;
    transition: background-color 5000s ease-in-out 0s;
}

/* Ensure placeholder text is visible but subtle */
::placeholder {
    color: rgba(255, 255, 255, 0.6);
    /* Higher contrast placeholder */
}

/* Specific fix for select dropdowns to have readable options */
select.form-control option {
    background: #3d3d3d;
    color: #ffffff;
}

/* Tables */
.table-responsive {
    overflow-x: auto;
    border: 1px solid var(--card-border);
    border-radius: 0.75rem;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    background: transparent;
}

.data-table th {
    background: #0a0a0a;
    color: var(--text-secondary);
    font-weight: 500;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    padding: 1rem 1.5rem;
    text-align: left;
    border-bottom: 1px solid var(--card-border);
    cursor: pointer;
    user-select: none;
}

.data-table th:hover {
    color: var(--text-primary);
}

.data-table td {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid var(--card-border);
    color: var(--text-primary);
    font-size: 0.9rem;
}

.data-table tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

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

/* Status Badges */
.status-badge {
    padding: 0.2rem 0.6rem;
    border-radius: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.status-active,
.status-PAGO {
    color: var(--success-color);
    background: rgba(52, 199, 89, 0.1);
    border: 1px solid rgba(52, 199, 89, 0.2);
}

.status-inactive,
.status-VENCIDO {
    color: var(--danger-color);
    background: rgba(255, 59, 48, 0.1);
    border: 1px solid rgba(255, 59, 48, 0.2);
}

/* Navbar/Header */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 0;
    /* Align with container */
    background: transparent;
    /* Transparent header for minimal feel */
    border-bottom: 1px solid var(--card-border);
    margin-bottom: 2rem;
    max-width: 1400px;
    margin: 0 auto 2rem auto;
    padding: 1.5rem 2rem;
}

.page-header {
    background: transparent !important;
    border-bottom: none !important;
    padding: 0 !important;
    margin-bottom: 2rem !important;
}

/* Specific Utilities */
.avatar-circle {
    width: 32px;
    height: 32px;
    background: #1a1a1a !important;
    border: 1px solid var(--card-border) !important;
    color: var(--text-primary) !important;
    font-size: 0.8rem !important;
}

.icon-box {
    background: #1a1a1a !important;
    color: var(--text-primary) !important;
}

.grid-2 {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.5rem;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.section-header {
    grid-column: 1 / -1;
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--text-secondary);
    margin: 2rem 0 1rem 0;
    font-weight: 700;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 0.5rem;
}

.dash-card {
    display: flex;
    flex-direction: column;
    padding: 2rem;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    height: 100%;
}

.dash-card:hover {
    transform: translateY(-5px);
    border-color: var(--accent-color);
    background: rgba(255, 255, 255, 0.03);
}

.dash-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.dash-card h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.25rem;
}

.dash-card p {
    margin: 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.5;
}

.hero-welcome {
    padding: 3rem;
    background: linear-gradient(135deg, rgba(30, 41, 59, 0.4) 0%, rgba(15, 23, 42, 0.4) 100%);
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .dashboard-grid {
        grid-template-columns: 1fr;
    }
    
    .app-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
}