@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

:root {
    --bg-color: #08090b;
    --glass-bg: rgba(20, 22, 28, 0.4);
    --glass-border: rgba(255, 255, 255, 0.05);
    --text-primary: #f5f5f7;
    --text-secondary: #86868b;
    --accent-color: #3aabae;
    --accent-hover: #00bfa5;
    --accent-glow: rgba(58, 171, 174, 0.5);
    --danger-color: #ff453a;
    --danger-bg: rgba(255, 69, 58, 0.1);
    --success-color: #32d74b;
    --success-bg: rgba(50, 215, 75, 0.1);
    --card-radius: 20px;
    --transition-speed: 0.35s;
}

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

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-primary);
    line-height: 1.6;
    min-height: 100vh;
    background-image:
        radial-gradient(circle at 0% 0%, rgba(58, 171, 174, 0.15) 0%, transparent 40%),
        radial-gradient(circle at 100% 100%, rgba(50, 215, 75, 0.08) 0%, transparent 40%);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
}

a {
    text-decoration: none;
    color: var(--accent-color);
    transition: color var(--transition-speed);
}

a:hover {
    color: var(--accent-hover);
}

/* ==== LOGIN OVERHAUL ==== */
.login-body {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 420px;
    position: relative;
    z-index: 10;
}

/* Backglow effect */
.login-container::before {
    content: '';
    position: absolute;
    top: -20px;
    left: -20px;
    right: -20px;
    bottom: -20px;
    background: radial-gradient(circle at top left, var(--accent-glow), transparent 60%);
    z-index: -1;
    filter: blur(40px);
    opacity: 0.5;
    animation: slowPulse 4s infinite alternate;
}

@keyframes slowPulse {
    0% {
        opacity: 0.3;
        transform: scale(1);
    }

    100% {
        opacity: 0.6;
        transform: scale(1.05);
    }
}

.login-glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 45px 40px;
    backdrop-filter: blur(25px);
    -webkit-backdrop-filter: blur(25px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.05);
    text-align: center;
}

.logo-text {
    font-size: 2.8rem;
    font-weight: 800;
    letter-spacing: -1.5px;
    background: linear-gradient(135deg, #ffffff, #86868b);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 2px;
}

.subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    letter-spacing: 3px;
    margin-bottom: 35px;
    font-weight: 500;
    text-transform: uppercase;
}

/* FORMS PREMIUN */
.form-group {
    margin-bottom: 24px;
    text-align: left;
    position: relative;
}

label {
    display: block;
    margin-bottom: 8px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-speed);
}

.form-group:focus-within label {
    color: var(--text-primary);
}

.form-control {
    width: 100%;
    padding: 14px 18px;
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--text-primary);
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    transition: all var(--transition-speed);
    appearance: none;
    -webkit-appearance: none;
    outline: none;
}

.form-control::placeholder {
    color: rgba(255, 255, 255, 0.2);
    font-weight: 300;
}

.form-control:hover {
    border-color: rgba(255, 255, 255, 0.15);
    background: rgba(255, 255, 255, 0.05);
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 4px rgba(58, 171, 174, 0.15);
    background: rgba(0, 0, 0, 0.2);
}

/* Chrome autofill fix */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus {
    -webkit-box-shadow: 0 0 0px 1000px #0a0b0e inset !important;
    -webkit-text-fill-color: var(--text-primary) !important;
    transition: background-color 5000s ease-in-out 0s;
}

.btn {
    display: inline-block;
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-family: 'Outfit', sans-serif;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all var(--transition-speed);
    text-align: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-color), #009e89);
    color: #fff;
    box-shadow: 0 8px 20px rgba(58, 171, 174, 0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #33ead0, var(--accent-color));
    z-index: -1;
    opacity: 0;
    transition: opacity var(--transition-speed);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px rgba(58, 171, 174, 0.5);
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-danger {
    background: var(--danger-bg);
    color: var(--danger-color);
    border: 1px solid rgba(255, 69, 58, 0.2);
}

.btn-danger:hover {
    background: var(--danger-color);
    color: #fff;
}

.btn-block {
    width: 100%;
    display: block;
}

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

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(255, 255, 255, 0.2);
}

/* ANIMACIONES GLOBALES */
.alert {
    padding: 14px 18px;
    border-radius: 12px;
    margin-bottom: 24px;
    font-size: 0.9rem;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

.alert-success {
    background: var(--success-bg);
    color: var(--success-color);
    border: 1px solid rgba(50, 215, 75, 0.2);
}

/* LAYOUT & NAVBAR */
.navbar {
    background: rgba(8, 9, 11, 0.85);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--glass-border);
    padding: 16px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.nav-brand {
    font-size: 1.4rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.5px;
}

.nav-brand span {
    font-weight: 400;
    color: var(--text-secondary);
    font-size: 0.9rem;
    margin-left: 8px;
    letter-spacing: 0;
}

.nav-links {
    display: flex;
    gap: 8px;
    align-items: center;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    padding: 10px 16px;
    border-radius: 8px;
    transition: all 0.2s;
}

.nav-links a.active {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.06);
}

.nav-links a:hover:not(.active):not(.btn-outline) {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}

.main-content {
    padding: 40px;
    max-width: 1400px;
    margin: 0 auto;
    animation: fadeIn 0.5s ease-out;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* CARDS PREMIUN */
.glass-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: var(--card-radius);
    padding: 30px;
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2), inset 0 1px 0 rgba(255, 255, 255, 0.02);
}

.stat-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 24px;
    margin-bottom: 40px;
}

.stat-card {
    display: flex;
    flex-direction: column;
    padding: 24px;
    transition: transform var(--transition-speed);
}

.stat-card:hover {
    transform: translateY(-4px);
    border-color: rgba(255, 255, 255, 0.1);
}

.stat-title {
    font-size: 0.85rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 1.5px;
    margin-bottom: 12px;
    font-weight: 600;
}

.stat-value {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
}

.stat-value.metric-danger {
    color: var(--danger-color);
}

.stat-value.metric-success {
    color: var(--success-color);
}

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

.page-title {
    font-size: 2.2rem;
    font-weight: 700;
    letter-spacing: -1px;
    margin-bottom: 5px;
}

/* TABLES PREMIUN */
.table-wrapper {
    overflow-x: auto;
}

.glass-table {
    width: 100%;
    border-collapse: collapse;
}

.glass-table th {
    padding: 16px 20px;
    text-align: left;
    color: var(--text-secondary);
    font-weight: 600;
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.glass-table td {
    padding: 20px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 1rem;
    vertical-align: middle;
}

.glass-table tbody tr {
    transition: background var(--transition-speed);
}

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

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

/* BADGES PREMIUN */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.badge-active {
    background: var(--success-bg);
    color: var(--success-color);
    border: 1px solid rgba(50, 215, 75, 0.2);
}

.badge-completed {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* CAMPAIGN BOXES PREMIUN */
.campaign-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
    margin-top: 20px;
}

.campaign-box {
    background: rgba(20, 22, 28, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 16px;
    padding: 24px;
    transition: all var(--transition-speed);
    position: relative;
    backdrop-filter: blur(10px);
}

.campaign-box:hover {
    border-color: rgba(255, 255, 255, 0.15);
    transform: translateY(-4px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
}

.campaign-box.completed {
    background: rgba(255, 255, 255, 0.02);
    opacity: 0.7;
    border-color: rgba(255, 255, 255, 0.03);
}

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

.cb-title {
    font-size: 1.15rem;
    font-weight: 600;
    line-height: 1.3;
}

.cb-date {
    font-size: 0.85rem;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.cb-budget {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--success-color);
    margin: 20px 0;
    letter-spacing: -1px;
}

.cb-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 20px;
    border-top: 1px solid var(--glass-border);
    padding-top: 20px;
}

/* MODALS PREMIUN */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-speed);
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-content {
    background: #101216;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--card-radius);
    padding: 35px;
    width: 100%;
    max-width: 480px;
    transform: scale(0.95) translateY(20px);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.modal-overlay.active .modal-content {
    transform: scale(1) translateY(0);
}

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

.modal-title {
    font-size: 1.4rem;
    font-weight: 700;
}

.close-btn {
    background: rgba(255, 255, 255, 0.05);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    color: var(--text-secondary);
    font-size: 1.2rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: all 0.2s;
}

.close-btn:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.1);
}

/* --- Floating Brand Tag (Bottom Left - Compact Dark Turquoise) --- */
.brand-tag-vertical {
    position: fixed;
    left: 0;
    bottom: 20px;
    top: auto;
    transform: none;
    background: #6824A6;
    /* Dark Turquoise */
    color: white;
    padding: 5px 3px;
    border-radius: 0 5px 5px 0;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-left: none;
    z-index: 9999;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.4);
    display: flex;
    flex-direction: column;
    align-items: center;
    font-size: 0.45rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    font-family: sans-serif;
    transition: 0.3s;
    text-decoration: none;
    cursor: pointer;
}

.brand-tag-vertical:hover {
    padding-left: 6px;
    box-shadow: 3px 0 12px rgba(0, 0, 0, 0.5);
    background: #00545c;
    /* Lighter Turquoise on hover */
}

.tag-text-vertical {
    writing-mode: vertical-rl;
    text-orientation: mixed;
    transform: rotate(180deg);
    padding: 3px 0;
    white-space: nowrap;
    opacity: 0.9;
}

.tag-icon-vertical {
    margin-top: 3px;
    font-size: 0.5rem;
    color: #D4AF37;
    /* Gold Icon */
}