/* CSS Design System: MasterFy Premium Dark Theme, High-Density Compact Layout */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #ff5a1f;
    --primary-hover: #e04a00;
    --primary-glow: rgba(255, 90, 31, 0.15);
    --bg-dark: #08090c; /* Aurepay dashboard dark background */
    --card-bg: #0c0d12; /* Dark slate card background */
    --card-border: 1px solid rgba(255, 255, 255, 0.03);
    --border-thin: 1px solid rgba(255, 255, 255, 0.03);
    --text-main: #ffffff; /* White text for metrics and values */
    --text-secondary: #8e9cae; /* Light grey/blue for labels */
    --text-muted: #4e5968; /* Darker grey for labels */
    
    --success: #10b981; /* Neon green indicator */
    --warning: #f59e0b;
    --danger: #ef4444;
    --info: #3b82f6;

    --font-inter: 'Inter', sans-serif;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: var(--font-inter);
}

input, button, select, textarea {
    font-family: var(--font-inter) !important;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-main);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 0.82rem; /* Reduced body base font size */
}

/* Scrollbar styling */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}
::-webkit-scrollbar-track {
    background: #08090d;
}
::-webkit-scrollbar-thumb {
    background: #1c1f2b;
    border-radius: 2px;
}
::-webkit-scrollbar-thumb:hover {
    background: #2a2e3f;
}

/* App Layout structure (Sidebar style) */
.app-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar Styling (Compact Width) */
.sidebar-aside {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 230px; /* Reduced from 260px */
    background-color: #060709;
    border-right: var(--border-thin);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    z-index: 100;
}

.sidebar-logo-wrapper {
    padding: 16px 20px; /* Reduced padding */
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
}

.sidebar-logo-text {
    font-size: 1.1rem; /* Reduced from 1.25rem */
    font-weight: 800;
    color: #ffffff !important;
    letter-spacing: -0.5px;
}

/* Profile Card in Sidebar */
.sidebar-profile-card {
    padding: 12px 16px; /* Reduced padding */
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    background-color: rgba(255, 255, 255, 0.01);
}

.profile-card-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.profile-card-name {
    font-size: 0.8rem; /* Reduced from 0.88rem */
    font-weight: 700;
    color: #ffffff !important;
}

.profile-card-id {
    font-size: 0.68rem; /* Reduced */
    color: var(--text-muted);
    margin-top: 1px;
}

/* Sidebar Menu */
.sidebar-nav {
    flex-grow: 1;
    padding: 12px 8px; /* Reduced padding */
    overflow-y: auto;
}

.sidebar-menu-group {
    margin-bottom: 16px; /* Reduced from 24px */
}

.sidebar-group-title {
    font-size: 0.65rem; /* Reduced from 0.72rem */
    font-weight: 700;
    color: var(--text-muted);
    letter-spacing: 0.8px;
    padding: 6px 10px;
    text-transform: uppercase;
}

.sidebar-menu {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 2px; /* Reduced gap */
}

.sidebar-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px; /* Reduced padding */
    color: #a1a1aa !important; /* Silver gray link color */
    text-decoration: none;
    font-size: 0.82rem; /* Reduced from 0.85rem */
    font-weight: 500;
    border-radius: 4px;
    transition: all 0.15s ease;
}

.sidebar-link svg {
    width: 15px; /* Smaller icons */
    height: 15px;
    stroke: #a1a1aa;
    transition: stroke 0.15s ease;
}

.sidebar-link:hover {
    color: #ffffff !important;
    background-color: rgba(255, 255, 255, 0.04) !important;
}

.sidebar-link.active {
    background-color: transparent !important;
    color: var(--primary) !important; /* Aurepay active orange */
    font-weight: 600;
    border-left: none !important;
}

.sidebar-link.active svg {
    stroke: var(--primary) !important;
}

/* Bottom elements of Sidebar */
.sidebar-footer {
    padding: 12px 16px; /* Reduced padding */
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Main Workspace */
.main-wrapper {
    margin-left: 230px; /* Adjusted to compact sidebar width */
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    background-color: #08090c;
}

/* Top bar */
.topbar-header {
    background-color: #08090d;
    border-bottom: var(--border-thin);
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 20px; /* Reduced from 18px 24px */
}

.topbar-breadcrumbs {
    font-size: 0.75rem; /* Reduced from 0.8rem */
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.period-badge {
    background-color: #11131b;
    border: var(--card-border);
    color: var(--text-main);
    padding: 6px 10px; /* Reduced padding */
    font-size: 0.72rem; /* Reduced from 0.78rem */
    font-weight: 600;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Page container */
.page-container {
    padding: 16px 20px; /* Reduced from 24px */
    width: 100%;
    margin: 0 auto;
    flex-grow: 1;
}

/* Cards */
.data-card, .glass-card {
    background-color: var(--card-bg);
    border: var(--card-border);
    border-radius: 12px !important; /* Set to 12px matching login */
    padding: 14px 16px; /* Reduced from 20px */
    margin-bottom: 16px; /* Reduced from 20px */
    position: relative;
    overflow: hidden;
}

/* 4-Column KPI row */
.kpi-row-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px; /* Reduced from 20px */
    margin-bottom: 16px;
}

.kpi-card {
    background-color: var(--card-bg);
    border: var(--card-border);
    padding: 14px 16px; /* Reduced from 20px */
    border-radius: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.kpi-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem; /* Reduced from 0.8rem */
    color: var(--text-secondary);
    font-weight: 600;
}

.kpi-card-value {
    font-size: 1.25rem; /* Reduced from 1.5rem */
    font-weight: 800;
    color: var(--text-main);
    margin-top: 2px;
}

.kpi-card-sub {
    font-size: 0.7rem; /* Reduced from 0.75rem */
    color: var(--text-muted);
}

/* Chart block wrapper (Diárias e Parceladas) */
.charts-block-grid {
    display: grid;
    grid-template-columns: 1fr 300px; /* Reduced sidebar width */
    gap: 16px;
    margin-bottom: 16px;
}

/* Financial gauges and Payment methods row */
.bottom-block-grid {
    display: grid;
    grid-template-columns: 1fr 360px; /* Reduced right column width */
    gap: 16px;
}

/* Gauge styling (Compact layout) */
.gauges-wrapper {
    display: flex;
    justify-content: space-around;
    align-items: center;
    padding: 10px 0;
    flex-wrap: wrap;
    gap: 12px;
}

.gauge-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.gauge-circle-container {
    position: relative;
    width: 80px; /* Reduced from 110px */
    height: 80px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.gauge-inner-info {
    position: absolute;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.gauge-inner-val {
    font-size: 0.8rem; /* Reduced from 0.95rem */
    font-weight: 800;
    color: var(--text-main);
}

.gauge-inner-sub {
    font-size: 0.6rem; /* Reduced */
    color: var(--text-muted);
}

.gauge-label {
    font-size: 0.78rem; /* Reduced from 0.85rem */
    font-weight: 700;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Payment methods list */
.payment-methods-list {
    display: flex;
    flex-direction: column;
    gap: 10px; /* Reduced from 16px */
    margin-top: 6px;
}

.payment-method-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    padding-bottom: 8px; /* Reduced from 12px */
}

.payment-method-icon {
    width: 26px; /* Reduced from 32px */
    height: 26px;
    border-radius: 4px;
    background-color: rgba(255, 255, 255, 0.02);
    border: var(--card-border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
}

.payment-method-icon svg {
    width: 13px;
    height: 13px;
}

.payment-method-name {
    font-size: 0.8rem; /* Reduced from 0.88rem */
}

.payment-method-percent {
    font-size: 0.82rem; /* Reduced */
    font-weight: 700;
    color: var(--text-main);
}

.payment-method-count {
    font-size: 0.68rem;
    color: var(--text-muted);
}

/* Forms (Compact Layout) */
.form-group {
    margin-bottom: 12px; /* Reduced from 20px */
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.form-label {
    font-size: 0.78rem; /* Reduced from 0.85rem */
}

.form-input, .form-select, .form-textarea {
    background-color: #090a0e;
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-main);
    padding: 8px 12px; /* Reduced from 12px 14px */
    font-size: 0.82rem; /* Reduced from 0.9rem */
    border-radius: 0;
}

/* Buttons (Compact sizes) */
.btn-primary {
    background-color: var(--primary);
    color: #fff;
    border: none;
    padding: 7px 14px; /* Reduced from 10px 20px */
    font-size: 0.8rem; /* Reduced from 0.9rem */
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

.btn-secondary {
    background-color: transparent;
    color: var(--text-main);
    border: 1px solid rgba(255, 255, 255, 0.15);
    padding: 7px 14px; /* Reduced */
    font-size: 0.8rem; /* Reduced */
    font-weight: 600;
    cursor: pointer;
    border-radius: 0;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
    text-decoration: none;
}

/* Tables (Compact spacing) */
.table-custom {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.8rem; /* Reduced from 0.9rem */
}

.table-custom th {
    background-color: #0b0c10;
    color: var(--text-secondary);
    text-align: left;
    padding: 10px 12px; /* Reduced from 14px 16px */
    font-weight: 600;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.table-custom td {
    padding: 8px 12px; /* Reduced from 14px 16px */
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--text-main);
}

/* Subtabs menu in pages */
.subtabs-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
    border-bottom: 1px solid rgba(255,255,255,0.03);
    padding-bottom: 8px;
}

.subtab-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.78rem;
    font-weight: 600;
    padding: 6px 12px;
    border-radius: 3px;
    transition: all 0.2s;
}

.subtab-link:hover {
    color: var(--text-main);
    background-color: rgba(255,255,255,0.02);
}

.subtab-link.active {
    background-color: rgba(34, 197, 94, 0.08);
    color: var(--primary);
}

/* Alert Boxes */
.alert {
    padding: 10px 14px;
    border-radius: 0;
    font-size: 0.8rem;
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.alert-success {
    background-color: rgba(34, 197, 94, 0.08);
    border: 1px solid rgba(34, 197, 94, 0.15);
    color: #22c55e;
}

.alert-danger {
    background-color: rgba(239, 68, 68, 0.08);
    border: 1px solid rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.alert-info {
    background-color: rgba(59, 130, 246, 0.08);
    border: 1px solid rgba(59, 130, 246, 0.15);
    color: #3b82f6;
}

/* Badges */
.badge {
    display: inline-flex;
    padding: 3px 6px; /* Reduced padding */
    font-size: 0.7rem; /* Reduced */
}

/* Footer elements */
.footer-text {
    text-align: center;
    padding: 14px 0;
    color: var(--text-muted);
    font-size: 0.7rem;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    margin-top: 30px;
}

/* Split Login Card Styling (Aurepay inspired separate cards) */
.auth-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: #180C0D; /* Aurepay deep dark red background */
    padding: 20px;
}

.auth-split-card {
    display: flex;
    gap: 24px; /* Gap between separate banner and form cards! */
    align-items: stretch;
    justify-content: center;
    width: 100%;
    max-width: 960px;
    background-color: transparent;
    border: none;
    box-shadow: none !important;
}

.auth-banner-card {
    background-image: url("data:image/svg+xml;charset=utf-8,%3Csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 568 596'%3E%3Crect width='567.717' height='596' fill='url(%23a)' rx='10'/%3E%3Cmask id='b' width='568' height='596' x='0' y='0' maskUnits='userSpaceOnUse' style='mask-type:alpha'%3E%3Crect width='568' height='596' fill='%23d9d9d9' rx='10'/%3E%3C/mask%3E%3Cg mask='url(%23b)'%3E%3Cpath fill='url(%23c)' d='M396.318 118.015 211.689 302.644H-3.97c-17.137 0-31.03-13.893-31.03-31.03V37.337L261.337-259h134.981v144.29L163.592 118.015z'/%3E%3Cpath fill='url(%23d)' d='m167 494.984 184.629-184.629h215.659c17.137 0 31.03 13.893 31.03 31.03v234.277L301.981 871.999H167V727.71l232.725-232.726z'/%3E%3C/g%3E%3Cdefs%3E%3ClinearGradient id='a' x1='283.859' x2='142' y1='0' y2='1165' gradientUnits='userSpaceOnUse'%3E%3Cstop/%3E%3Cstop offset='1' stop-color='%23bd4d4f'/%3E%3C/linearGradient%3E%3ClinearGradient id='c' x1='183.764' x2='461.481' y1='83.562' y2='-215.558' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%232c1515'/%3E%3Cstop offset='1' stop-color='%23622829' stop-opacity='0'/%3E%3C/linearGradient%3E%3ClinearGradient id='d' x1='379.554' x2='101.837' y1='529.437' y2='828.557' gradientUnits='userSpaceOnUse'%3E%3Cstop stop-color='%232c1515'/%3E%3Cstop offset='1' stop-color='%23622829' stop-opacity='0'/%3E%3C/linearGradient%3E%3C/defs%3E%3C/svg%3E");
    background-size: cover;
    background-position: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 12px !important;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
    flex: 1;
    min-height: 520px;
    position: relative;
    overflow: hidden;
}

.auth-form-card {
    background-color: #f4f4f5; /* Light grey/white card background from Imagem 1 */
    border: 1px solid rgba(0, 0, 0, 0.05);
    border-radius: 12px !important;
    padding: 40px;
    flex: 1.15;
    display: flex;
    flex-direction: column;
    justify-content: center;
    color: #09090b; /* Dark text */
}

.auth-banner-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at center, rgba(255,255,255,0.01) 0%, rgba(0,0,0,0) 80%);
}

/* Form Input Error Class */
.form-input {
    transition: border-color 0.25s cubic-bezier(0.4, 0, 0.2, 1), box-shadow 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    background-color: #ffffff !important;
    border: 1px solid #d4d4d8 !important;
    color: #09090b !important;
}

.form-input:focus {
    border-color: #09090b !important; /* Black focus border */
    box-shadow: 0 0 0 3px rgba(9, 9, 11, 0.12) !important;
    outline: none;
}

.form-input:hover {
    border-color: #a1a1aa !important;
}

.form-input.error {
    border-color: #ef4444 !important;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.15) !important;
}

/* Nuxt-style validation transition animations */
.validation-error-container {
    display: grid;
    grid-template-rows: 0fr;
    opacity: 0;
    transition: grid-template-rows 0.3s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.validation-error-container.show {
    grid-template-rows: 1fr;
    opacity: 1;
}

.validation-error-inner {
    overflow: hidden;
}

/* Button & Link Hover Animations */
.btn-primary {
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.btn-primary:hover {
    filter: brightness(1.1);
    transform: translateY(-1px);
}

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


/* Language Dropdown Selector Styles */
.lang-dropdown-wrapper {
    position: relative;
    display: inline-block;
}

.lang-dropdown-menu {
    display: none;
    position: absolute;
    top: calc(100% + 6px);
    right: 0;
    background-color: #ffffff;
    border: 1px solid #e4e4e7;
    border-radius: 6px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    z-index: 100;
    min-width: 120px;
    padding: 4px;
}

.lang-dropdown-menu.show {
    display: block;
}

.lang-dropdown-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 10px;
    font-size: 0.76rem;
    color: #3f3f46;
    text-decoration: none;
    cursor: pointer;
    border-radius: 4px;
    transition: background-color 0.15s;
}

.lang-dropdown-item:hover {
    background-color: #f4f4f5;
    color: #09090b;
}

@media (max-width: 768px) {
    .auth-container {
        padding: 12px !important;
        justify-content: flex-start;
        padding-top: 40px !important;
    }
    .auth-split-card {
        flex-direction: column !important;
        gap: 16px !important;
        width: 100% !important;
    }
    .auth-banner-card {
        min-height: 140px !important;
        padding: 20px !important;
        flex: none !important;
    }
    .auth-form-card {
        padding: 24px 20px !important;
        flex: none !important;
    }
}



