/* Barbie / Inspiración Rosa Theme */
@import url('https://fonts.googleapis.com/css2?family=Nunito:wght@400;600;700;800&display=swap');

:root {
    /* Palette */
    --bg-gradient-start: #ff9a9e;
    --bg-gradient-end: #fecfef;

    --glass-bg: rgba(255, 255, 255, 0.45);
    /* More transparent white */
    --glass-border: rgba(255, 255, 255, 0.6);
    --glass-shadow: 0 8px 32px 0 rgba(255, 105, 180, 0.2);

    --text-primary: #880e4f;
    /* Deep Pink/Purple for readability */
    --text-secondary: #ad1457;

    --accent-pink: #d81b60;
    --accent-hot-pink: #f50057;
    --accent-soft-pink: #f8bbd0;

    --success: #00c853;
    /* Keep readable but maybe softer? */
    --danger: #ff1744;

    --card-radius: 1.5rem;
    --font-main: 'Nunito', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg, var(--bg-gradient-start) 0%, var(--bg-gradient-end) 100%);
    background-size: 400% 400%;
    animation: gradientFlow 15s ease infinite;
    color: var(--text-primary);
    min-height: 100vh;
    display: flex;
    /* Optional: Overlay texture for sparkles if we had an image */
}

@keyframes gradientFlow {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Glassmorphism Utilities */
.glass-panel {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    box-shadow: var(--glass-shadow);
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.glass-panel:hover {
    transform: translateY(-5px);
    box-shadow: 0 12px 40px 0 rgba(255, 105, 180, 0.3);
}

/* Auth Pages (Login) */
.auth-container {
    width: 100%;
    height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1rem;
}

.auth-box {
    width: 100%;
    max-width: 400px;
    background: rgba(255, 255, 255, 0.65);
    border: 2px solid #fff;
}

/* Layout */
.app-container {
    display: flex;
    width: 100%;
    min-height: 100vh;
}

.sidebar {
    width: 260px;
    background: rgba(255, 255, 255, 0.5);
    /* Semi-transparent white sidebar */
    backdrop-filter: blur(15px);
    border-right: 1px solid rgba(255, 255, 255, 0.7);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 10;
}

.main-content {
    flex: 1;
    margin-left: 260px;
    padding: 2rem;
    overflow-y: auto;
}

/* Typography & Headings */
h1,
h2,
h3,
h4 {
    color: var(--accent-hot-pink);
    margin-bottom: 1rem;
    letter-spacing: -0.5px;
    font-weight: 800;
}

.text-gradient {
    /* Shiny pink gradient text */
    background: linear-gradient(45deg, #ec407a, #ab47bc);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 900 !important;
}

/* Navigation */
.nav-link {
    display: flex;
    align-items: center;
    padding: 1rem;
    color: var(--text-primary);
    text-decoration: none;
    border-radius: 1rem;
    margin-bottom: 0.5rem;
    transition: all 0.3s ease;
    font-weight: 700;
}

.nav-link i {
    width: 24px;
    margin-right: 0.75rem;
    color: var(--accent-pink);
}

.nav-link:hover,
.nav-link.active {
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
    color: var(--accent-hot-pink);
    box-shadow: 0 4px 15px rgba(233, 30, 99, 0.2);
}

.nav-link.active i {
    color: var(--accent-hot-pink);
}

/* Buttons */
.btn-primary {
    background: linear-gradient(45deg, #f06292, #ec407a);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 2rem;
    /* Pill shape */
    cursor: pointer;
    font-weight: 700;
    font-family: inherit;
    transition: all 0.3s ease;
    box-shadow: 0 5px 15px rgba(233, 30, 99, 0.4);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    text-transform: uppercase;
    font-size: 0.9rem;
}

.btn-primary:hover {
    background: linear-gradient(45deg, #ec407a, #d81b60);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(233, 30, 99, 0.6);
}

/* Forms */
.form-group {
    margin-bottom: 1.5rem;
}

label {
    display: block;
    margin-bottom: 0.5rem;
    color: var(--text-secondary);
    font-weight: 700;
    font-size: 0.9rem;
}

input,
select {
    width: 100%;
    padding: 0.8rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    border: 2px solid transparent;
    border-radius: 1rem;
    color: var(--text-primary);
    font-family: inherit;
    font-size: 1rem;
    transition: all 0.3s ease;
}

input:focus,
select:focus {
    outline: none;
    border-color: var(--accent-pink);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(233, 30, 99, 0.1);
}

/* Tables */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 0.5rem;
    /* Space between rows */
}

th {
    color: var(--accent-pink);
    font-weight: 800;
    text-transform: uppercase;
    font-size: 0.85rem;
    padding: 1rem;
}

td {
    background: rgba(255, 255, 255, 0.4);
    padding: 1rem;
    font-weight: 600;
}

/* Rounded corners for first and last cells */
tr td:first-child {
    border-top-left-radius: 1rem;
    border-bottom-left-radius: 1rem;
}

tr td:last-child {
    border-top-right-radius: 1rem;
    border-bottom-right-radius: 1rem;
}

tr:hover td {
    background: rgba(255, 255, 255, 0.8);
}

/* Cards (Dashboard/Debts) */
.kpi-card {
    display: flex;
    flex-direction: column;
}

.kpi-label {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 700;
    text-transform: uppercase;
}

.kpi-value {
    font-size: 2rem;
    font-weight: 800;
    background: linear-gradient(45deg, #d81b60, #8e24aa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 0.5rem 0;
}

/* Modals */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 182, 193, 0.6);
    /* Translucent Pink Backdrop */
    backdrop-filter: blur(5px);
    justify-content: center;
    align-items: center;
    z-index: 100;
}

.modal.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    width: 90%;
    max-width: 500px;
    background: rgba(255, 255, 255, 0.9) !important;
    border: 2px solid #fff;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.close-btn {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 1.5rem;
    cursor: pointer;
    transition: color 0.3s;
}

.close-btn:hover {
    color: var(--accent-hot-pink);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: rgba(233, 30, 99, 0.3);
    border-radius: 5px;
}

::-webkit-scrollbar-thumb:hover {
    background: rgba(233, 30, 99, 0.6);
}

/* Progress Bars */
.progress-bg {
    background: rgba(255, 255, 255, 0.5);
    border-radius: 10px;
    height: 10px;
    width: 100%;
    overflow: hidden;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #f06292, #f50057);
    border-radius: 10px;
    transition: width 0.5s ease;
}