:root {
    --bg-body: #0A0A0A;
    --bg-base: #070707;
    --glass-bg: rgba(255, 255, 255, 0.03);
    --glass-bg-hover: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-light: rgba(255, 255, 255, 0.12);
    --glass-highlight: rgba(255, 255, 255, 0.15);
    --surface-top: #1A1A1A;
    --surface-bottom: #0F0F0F;
    --surface: #1E1E1E;
    --surface-light: #2A2A2A;
    --border-light: rgba(255, 255, 255, 0.1);
    --border-dark: rgba(0, 0, 0, 0.6);
    --text-main: rgba(255, 255, 255, 0.9);
    --text-primary: #EDEDED;
    --text-secondary: #888888;
    --text-muted: rgba(255, 255, 255, 0.4);
    --text-dim: rgba(255, 255, 255, 0.25);
    --text-tertiary: #4A4A4A;
    --accent-green: #4ADE80;
    --accent-red: #EF4444;
    --accent-orange: #FF8A4C;
    --leather-main: #2A2118;
    --leather-dark: #1A1410;
    --leather-light: #3D3028;
    --leather-highlight: #4A3D30;
    --shadow-deep: rgba(0, 0, 0, 0.6);
    --font-mono: 'SF Mono', 'Consolas', 'Courier New', monospace;
    --font-sans: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    --radius-lg: 24px;
    --radius-md: 12px;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    -webkit-font-smoothing: antialiased;
}

html, body {
    height: 100%;
    width: 100%;
}

body {
    background: var(--bg-body);
    background-image: 
        radial-gradient(ellipse at 20% 20%, rgba(40, 40, 50, 0.4) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 80%, rgba(30, 30, 40, 0.3) 0%, transparent 50%);
    color: var(--text-main);
    font-family: var(--font-sans);
    overflow-x: hidden;
    overflow-y: auto;
}

.grain-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    opacity: 0.012;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 400 400' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noiseFilter'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noiseFilter)'/%3E%3C/svg%3E");
}

/* Page Layout */
.page-container {
    min-height: 100%;
    width: 100%;
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Top Navigation */
.top-nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 24px;
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    box-shadow: 0 4px 24px var(--shadow-deep);
}

.nav-spacer {
    flex: 1;
}

.pro-badge-container {
    flex: 1;
    display: flex;
    justify-content: flex-end;
}

.pro-badge {
    background: linear-gradient(145deg, var(--accent-orange), #FF6B2C);
    border: none;
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 1.5px;
    box-shadow: 0 4px 12px rgba(255, 138, 76, 0.3);
}

.nav-actions {
    display: flex;
    gap: 10px;
}

.nav-btn {
    padding: 10px 18px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    color: var(--text-main);
}

.nav-btn.primary {
    background: var(--accent-green);
    border-color: var(--accent-green);
    color: #000;
    font-weight: 600;
}

.nav-btn.primary:hover {
    background: #5AEE90;
    transform: translateY(-1px);
}

/* Main Content Grid */
.main-content {
    flex: 1;
    display: grid;
    grid-template-columns: 1fr 380px;
    gap: 20px;
}

.right-column {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Calendar Section */
.calendar-section {
    background: var(--glass-bg);
    backdrop-filter: blur(40px);
    -webkit-backdrop-filter: blur(40px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px var(--shadow-deep), inset 0 1px 0 0 var(--glass-highlight);
}

.calendar-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--glass-border);
}

.calendar-top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.calendar-title {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-muted);
    letter-spacing: 0.5px;
}

.calendar-actions {
    display: flex;
    gap: 8px;
}

.icon-btn {
    width: 36px;
    height: 36px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    opacity: 0.6;
    color: var(--text-main);
}

.icon-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    opacity: 1;
}

.calendar-main-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}

.date-section h1 {
    font-size: 28px;
    font-weight: 600;
    letter-spacing: -0.5px;
    margin-bottom: 6px;
}

.date-section h1 span {
    color: var(--text-muted);
    font-weight: 400;
}

.price-info {
    font-family: var(--font-mono);
    font-size: 14px;
    color: var(--text-muted);
}

.price-main {
    color: var(--text-main);
    font-weight: 600;
}

.price-remaining {
    color: var(--accent-green);
}

.nav-arrows {
    display: flex;
    gap: 6px;
}

.arrow {
    width: 38px;
    height: 38px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 18px;
    color: var(--text-muted);
    user-select: none;
}

.arrow:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    color: var(--text-main);
}

.arrow:active {
    transform: scale(0.95);
}

.calendar-wrapper {
    flex: 1;
    padding: 20px 28px;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    margin-bottom: 12px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--glass-border);
}

.weekday {
    text-align: center;
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 6px;
    flex: 1;
}

.day-cell {
    position: relative;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 12px;
    aspect-ratio: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 4px;
}

.day-cell:hover {
    background: var(--glass-bg);
    border-color: var(--glass-border);
}

.day-cell.other-month {
    opacity: 0.3;
}

.day-cell.today {
    border: 2px solid var(--accent-green);
}

.day-cell.has-sub {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    box-shadow: 0 4px 12px rgba(0,0,0,0.3), inset 0 1px 0 0 rgba(255,255,255,0.05);
}

.day-cell.has-sub:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    transform: translateY(-2px);
}

.day-cell.active {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 24px rgba(0,0,0,0.5), inset 0 1px 0 0 rgba(255,255,255,0.1);
}

.day-number {
    font-size: 11px;
    font-family: var(--font-mono);
    color: var(--text-dim);
}

.day-cell.has-sub .day-number {
    color: var(--text-muted);
}

.sub-icon-wrapper {
    width: 26px;
    height: 26px;
    background: var(--glass-bg-hover);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.day-cell:hover .sub-icon-wrapper {
    transform: scale(1.1);
}

.multi-sub-indicator {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 16px;
    height: 16px;
    background: var(--accent-orange);
    border-radius: 50%;
    font-size: 9px;
    font-weight: 700;
    color: #000;
    display: flex;
    align-items: center;
    justify-content: center;
}

.calendar-footer {
    padding: 18px 28px;
    border-top: 1px solid var(--glass-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: rgba(0,0,0,0.2);
}

.sub-details {
    display: flex;
    align-items: center;
    gap: 14px;
}

.status-indicator {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 12px var(--accent-green), 0 0 4px var(--accent-green);
}

.status-indicator.inactive {
    background: var(--text-dim);
    box-shadow: none;
}

.sub-name {
    font-size: 15px;
    font-weight: 500;
}

.sub-cycle {
    font-size: 11px;
    font-family: var(--font-mono);
    padding: 5px 10px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.sub-cost {
    font-family: var(--font-mono);
    font-size: 20px;
    font-weight: 600;
    color: var(--text-main);
}

.sub-cost.dim {
    color: var(--text-dim);
}

/* Chart Section */
.chart-section {
    background: linear-gradient(180deg, var(--surface-light) 0%, var(--surface) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-dark);
    box-shadow: 0 25px 50px -12px var(--shadow-deep), inset 0 1.5px 1px rgba(255, 255, 255, 0.08);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.chart-header-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.chart-icon {
    width: 44px;
    height: 44px;
    background: linear-gradient(145deg, #303030, #222222);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-dark);
    box-shadow: inset 0 1px 2px rgba(255,255,255,0.06), 2px 4px 12px rgba(0,0,0,0.4);
    font-size: 18px;
}

.chart-info h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
}

.chart-sub-info {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: var(--text-secondary);
}

.chart-header-right {
    text-align: right;
}

.chart-change {
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-green);
    margin-bottom: 4px;
}

.chart-change.negative {
    color: var(--accent-red);
}

.chart-value {
    font-size: 20px;
    font-weight: 600;
}

.chart-area {
    width: 100%;
    height: 160px;
    position: relative;
    cursor: crosshair;
}

.chart-svg {
    width: 100%;
    height: 100%;
    overflow: visible;
}

.y-axis-label {
    font-size: 10px;
    fill: var(--text-tertiary);
    font-weight: 500;
}

.grid-line {
    stroke: var(--text-tertiary);
    stroke-width: 1;
    stroke-dasharray: 4 4;
    opacity: 0.3;
}

.chart-line {
    stroke: var(--accent-orange);
    stroke-width: 2.5;
    fill: none;
    stroke-linecap: round;
    stroke-linejoin: round;
    transition: d 0.5s ease;
}

.chart-fill {
    fill: url(#chart-gradient);
    stroke: none;
    transition: d 0.5s ease;
}

.highlight-dot {
    stroke: var(--accent-orange);
    stroke-width: 2;
    fill: white;
    transition: all 0.15s ease;
}

.tooltip-rect {
    fill: var(--accent-green);
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.tooltip-text {
    font-size: 10px;
    font-weight: 600;
    fill: var(--bg-body);
}

.chart-crosshair {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
}

.time-selector {
    display: flex;
    background: linear-gradient(180deg, #1C1C1C, #181818);
    border-radius: var(--radius-md);
    padding: 4px;
    border: 1px solid var(--border-dark);
    box-shadow: inset 0 2px 5px rgba(0,0,0,0.4);
}

.time-selector button {
    flex: 1;
    padding: 8px 0;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease-out;
    font-family: inherit;
}

.time-selector button:hover:not(.active) {
    background: rgba(255,255,255,0.03);
    color: var(--text-primary);
}

.time-selector button.active {
    background: var(--accent-orange);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 8px -2px rgba(255, 138, 76, 0.4);
}

.chart-footer {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr;
    text-align: center;
    gap: 10px;
    padding-top: 16px;
    border-top: 1px solid var(--border-dark);
}

.chart-stat {
    position: relative;
}

.chart-stat:not(:last-child)::after {
    content: '';
    position: absolute;
    top: 50%;
    right: -5px;
    transform: translateY(-50%);
    width: 1px;
    height: 30px;
    background-color: var(--border-dark);
}

.chart-stat .label {
    font-size: 10px;
    color: var(--text-secondary);
    margin-bottom: 4px;
    display: block;
}

.chart-stat .value {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-stat.highlight .value {
    color: var(--accent-green);
}

/* Wallet Widget */
.wallet-widget {
    background: linear-gradient(180deg, var(--surface-top) 0%, var(--surface-bottom) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-dark);
    box-shadow: 0 25px 50px -12px var(--shadow-deep), inset 0 1px 0 var(--border-light);
    padding: 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.wallet-widget:hover {
    border-color: var(--glass-border-light);
    transform: translateY(-2px);
    box-shadow: 0 30px 60px -12px var(--shadow-deep);
}

.wallet-widget-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.wallet-widget-left {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mini-wallet {
    width: 50px;
    height: 35px;
    background: linear-gradient(180deg, var(--leather-highlight) 0%, var(--leather-main) 50%, var(--leather-dark) 100%);
    border-radius: 6px;
    position: relative;
    box-shadow: 0 6px 16px rgba(0,0,0,0.5), inset 0 1px 2px rgba(255,255,255,0.1);
    overflow: hidden;
}

.mini-wallet .mini-card {
    position: absolute;
    top: 6px;
    left: 6px;
    right: 6px;
    height: 16px;
    background: linear-gradient(180deg, #1A1A1A, #0D0D0D);
    border-radius: 3px;
    box-shadow: inset 0 1px 4px rgba(0,0,0,0.8);
}

.wallet-widget-info h3 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 2px;
}

.wallet-widget-info p {
    font-size: 11px;
    color: var(--text-secondary);
}

.expand-btn {
    width: 32px;
    height: 32px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    font-size: 14px;
    transition: all 0.3s ease;
}

.wallet-widget:hover .expand-btn {
    background: var(--glass-bg-hover);
    color: var(--text-main);
}

.wallet-widget-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 12px;
    padding: 12px 0;
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
}

.wallet-stat {
    text-align: center;
}

.wallet-stat-value {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.wallet-stat-value.green {
    color: var(--accent-green);
}

.wallet-stat-label {
    font-size: 10px;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 2px;
}

.wallet-quick-actions {
    display: flex;
    gap: 8px;
}

.quick-action-btn {
    flex: 1;
    padding: 8px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.quick-action-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    color: var(--text-main);
}

/* Wallet Modal */
.wallet-modal-overlay, .modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    padding: 20px;
}

.wallet-modal-overlay.active, .modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.wallet-modal, .modal {
    width: 100%;
    max-width: 440px;
    max-height: 90vh;
    overflow-y: auto;
    background: linear-gradient(180deg, var(--surface-top) 0%, var(--surface-bottom) 100%);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-dark);
    box-shadow: 0 50px 100px -20px rgba(0, 0, 0, 0.9), inset 0 1px 0 var(--border-light);
    transform: scale(0.9) translateY(20px);
    transition: all 0.3s ease;
}

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

.modal-header {
    padding: 24px 28px 20px;
    border-bottom: 1px solid var(--border-dark);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 18px;
    font-weight: 600;
}

.close-btn {
    width: 36px;
    height: 36px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--text-muted);
    font-size: 18px;
    transition: all 0.3s ease;
}

.close-btn:hover {
    background: var(--glass-bg-hover);
    color: var(--text-main);
}

.wallet-modal-content, .modal-content {
    padding: 28px;
}

.wallet-header-section {
    margin-bottom: 24px;
}

.plan-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 16px;
}

.plan-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.plan-price {
    font-size: 36px;
    font-weight: 600;
    color: var(--text-primary);
}

.plan-label {
    font-size: 13px;
    color: var(--text-secondary);
}

.apple-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 14px;
    background: linear-gradient(145deg, #1F1F1F, #141414);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    box-shadow: 2px 3px 8px rgba(0,0,0,0.4), inset 0 1px 0 rgba(255,255,255,0.05);
}

.apple-logo {
    font-size: 16px;
}

.next-payment {
    font-size: 12px;
    color: var(--accent-green);
    font-weight: 500;
}

.meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.member-since {
    font-size: 12px;
    color: var(--text-dim);
}

.action-buttons {
    display: flex;
    gap: 10px;
}

.action-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: transparent;
    border: 1px solid var(--border-dark);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: rgba(255,255,255,0.03);
    border-color: var(--border-light);
    color: var(--text-primary);
}

.action-btn svg {
    width: 14px;
    height: 14px;
    opacity: 0.6;
}

/* The Leather Wallet */
.wallet {
    width: 100%;
    max-width: 320px;
    height: 200px;
    position: relative;
    perspective: 1000px;
    margin: 0 auto 24px;
}

.wallet-body {
    width: 100%;
    height: 100%;
    position: relative;
    border-radius: 16px 16px 20px 20px;
    background: linear-gradient(180deg, var(--leather-highlight) 0%, var(--leather-main) 10%, var(--leather-main) 50%, var(--leather-dark) 100%);
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.9), 0 15px 30px -10px rgba(0, 0, 0, 0.7), inset 0 2px 3px rgba(255, 255, 255, 0.08), inset 0 -8px 20px rgba(0, 0, 0, 0.4);
    overflow: hidden;
    transition: transform 0.3s ease;
}

.wallet-body::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='leather'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23leather)'/%3E%3C/svg%3E");
    opacity: 0.06;
    mix-blend-mode: overlay;
    pointer-events: none;
}

.wallet-body::after {
    content: '';
    position: absolute;
    top: 0;
    left: 15px;
    right: 15px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--leather-highlight) 20%, var(--leather-light) 50%, var(--leather-highlight) 80%, transparent);
    border-radius: 0 0 50% 50%;
    opacity: 0.4;
}

.stitching {
    position: absolute;
    top: 10px;
    left: 10px;
    right: 10px;
    bottom: 10px;
    border: 2px dashed rgba(60, 50, 40, 0.5);
    border-radius: 12px;
    pointer-events: none;
}

.stitching::before {
    content: '';
    position: absolute;
    top: -1px;
    left: -1px;
    right: -1px;
    bottom: -1px;
    border: 1px dashed rgba(100, 85, 70, 0.2);
    border-radius: 12px;
}

.card-slot {
    position: absolute;
    top: 18px;
    left: 22px;
    right: 22px;
    height: 115px;
    background: linear-gradient(180deg, #080808 0%, #101010 100%);
    border-radius: 12px 12px 14px 14px;
    box-shadow: inset 0 5px 20px rgba(0, 0, 0, 0.9), inset 0 1px 3px rgba(0, 0, 0, 0.9), 0 -1px 2px rgba(74, 61, 48, 0.2);
    overflow: hidden;
}

.grey-card {
    position: absolute;
    width: calc(100% - 16px);
    height: 95px;
    left: 8px;
    border-radius: 12px;
    transition: transform 0.4s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.card-1 {
    bottom: -45px;
    background: linear-gradient(145deg, #161616 0%, #111111 100%);
    border: 1px solid rgba(255,255,255,0.04);
    box-shadow: 0 -4px 15px rgba(0,0,0,0.5);
    z-index: 1;
}

.card-2 {
    bottom: -30px;
    background: linear-gradient(165deg, #1F1F1F 0%, #1A1A1A 30%, #171717 70%, #141414 100%);
    border: 1px solid rgba(255,255,255,0.06);
    box-shadow: 0 -4px 20px rgba(0,0,0,0.6), inset 0 1px 0 rgba(255,255,255,0.05);
    z-index: 2;
    overflow: hidden;
}

.card-2::before {
    content: '';
    position: absolute;
    top: 0;
    left: 20px;
    right: 20px;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.wallet:hover .card-1 {
    transform: translateY(-12px);
}

.wallet:hover .card-2 {
    transform: translateY(-22px);
}

.card-apple-logo {
    position: absolute;
    top: 14px;
    left: 16px;
    font-size: 18px;
    color: rgba(255,255,255,0.5);
}

.card-chip {
    position: absolute;
    top: 12px;
    right: 16px;
    width: 28px;
    height: 22px;
    background: linear-gradient(145deg, #3A3A3A 0%, #2A2A2A 100%);
    border-radius: 4px;
    border: 1px solid rgba(255,255,255,0.05);
    box-shadow: inset 0 1px 1px rgba(255,255,255,0.1);
}

.card-chip::before {
    content: '';
    position: absolute;
    top: 5px;
    left: 4px;
    right: 4px;
    bottom: 5px;
    background: repeating-linear-gradient(90deg, transparent, transparent 3px, rgba(0,0,0,0.3) 3px, rgba(0,0,0,0.3) 4px);
}

.card-label {
    position: absolute;
    bottom: 40px;
    left: 16px;
    font-size: 8px;
    font-weight: 500;
    letter-spacing: 0.08em;
    color: rgba(255,255,255,0.25);
    text-transform: uppercase;
}

.wallet-emblem {
    position: absolute;
    bottom: 18px;
    left: 50%;
    transform: translateX(-50%);
    width: 32px;
    height: 32px;
    background: linear-gradient(145deg, #3A3A3A 0%, #252525 100%);
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 8px rgba(0,0,0,0.5), inset 0 1px 1px rgba(255,255,255,0.08);
    z-index: 10;
    font-size: 14px;
    color: rgba(255,255,255,0.4);
}

.card-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    padding: 16px 0;
    border-top: 1px solid var(--border-dark);
    border-bottom: 1px solid var(--border-dark);
    margin-bottom: 20px;
}

.card-number {
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-icon {
    width: 36px;
    height: 24px;
    background: linear-gradient(145deg, #1A1A1A, #141414);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 11px;
    color: rgba(255,255,255,0.5);
    box-shadow: 0 2px 4px rgba(0,0,0,0.3);
}

.card-digits {
    font-size: 13px;
    color: var(--text-secondary);
    font-family: var(--font-mono);
}

.update-link {
    font-size: 11px;
    color: var(--text-dim);
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.update-link:hover {
    color: var(--text-secondary);
    background: rgba(255,255,255,0.03);
}

/* Wallet Tabs */
.wallet-tabs {
    display: flex;
    gap: 4px;
    background: var(--glass-bg);
    padding: 4px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.wallet-tab {
    flex: 1;
    padding: 10px;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 500;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.wallet-tab:hover {
    color: var(--text-main);
}

.wallet-tab.active {
    background: var(--glass-bg-hover);
    color: var(--text-main);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
}

.section-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-dim);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 14px;
}

.sub-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sub-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 14px;
    background: linear-gradient(145deg, #141414 0%, #0E0E0E 100%);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.sub-item:hover {
    background: linear-gradient(145deg, #181818, #111111);
    border-color: var(--border-light);
}

.sub-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sub-logo {
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: #1A1A1A;
    border: 1px solid rgba(255,255,255,0.04);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.sub-item .sub-details h4 {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 2px;
}

.sub-item .sub-details span {
    font-size: 11px;
    color: var(--text-dim);
}

.sub-price-tag {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.add-sub-btn, .add-card-btn {
    width: 100%;
    padding: 14px;
    margin-top: 12px;
    background: var(--glass-bg);
    border: 1px dashed var(--glass-border);
    border-radius: 10px;
    color: var(--text-muted);
    font-size: 13px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.add-sub-btn:hover, .add-card-btn:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
    color: var(--text-main);
}

/* History Section */
.history-filters {
    display: flex;
    gap: 8px;
    margin-bottom: 16px;
}

.filter-btn {
    padding: 6px 12px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 6px;
    color: var(--text-muted);
    font-size: 11px;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-btn:hover {
    background: var(--glass-bg-hover);
}

.filter-btn.active {
    background: var(--accent-orange);
    border-color: var(--accent-orange);
    color: #fff;
}

.history-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-dark);
}

.history-item:last-child {
    border-bottom: none;
}

.history-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.history-icon {
    width: 36px;
    height: 36px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.history-details h4 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.history-details span {
    font-size: 11px;
    color: var(--text-dim);
}

.history-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--accent-red);
}

.history-amount.credit {
    color: var(--accent-green);
}

/* Cards List */
.cards-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.card-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 14px;
    background: linear-gradient(145deg, #141414 0%, #0E0E0E 100%);
    border: 1px solid var(--border-dark);
    border-radius: 10px;
    transition: all 0.2s ease;
}

.card-item:hover {
    background: linear-gradient(145deg, #181818, #111111);
    border-color: var(--border-light);
}

.card-item.primary {
    border-color: var(--accent-green);
}

.card-item-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.card-item-icon {
    width: 40px;
    height: 28px;
    background: linear-gradient(145deg, #2A2A2A, #1A1A1A);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
}

.card-item-details h4 {
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 2px;
}

.card-item-details span {
    font-size: 11px;
    color: var(--text-dim);
}

.card-item-badge {
    padding: 4px 8px;
    background: var(--accent-green);
    border-radius: 4px;
    font-size: 9px;
    font-weight: 700;
    color: #000;
    text-transform: uppercase;
}

/* Forms */
.form-group {
    margin-bottom: 16px;
}

.form-group label {
    display: block;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.form-group input,
.form-group select {
    width: 100%;
    padding: 12px 14px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 10px;
    color: var(--text-main);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
}

.form-group input:focus,
.form-group select:focus {
    outline: none;
    border-color: var(--accent-green);
    background: var(--glass-bg-hover);
}

.form-group input::placeholder {
    color: var(--text-dim);
}

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

.icon-picker {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.icon-option {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    cursor: pointer;
    font-size: 18px;
    transition: all 0.2s ease;
}

.icon-option:hover {
    background: var(--glass-bg-hover);
    border-color: var(--glass-border-light);
}

.icon-option.selected {
    border-color: var(--accent-green);
    background: rgba(74, 222, 128, 0.1);
}

.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 24px;
}

.btn-primary, .btn-secondary {
    flex: 1;
    padding: 12px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-primary {
    background: var(--accent-green);
    border: none;
    color: #000;
}

.btn-primary:hover {
    background: #5AEE90;
    transform: translateY(-1px);
}

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

.btn-secondary:hover {
    background: var(--glass-bg);
    border-color: var(--glass-border-light);
    color: var(--text-main);
}

/* Responsive */
@media (max-width: 900px) {
    .main-content {
        grid-template-columns: 1fr;
    }

    .right-column {
        order: 2;
    }
}

@media (max-width: 600px) {
    .page-container {
        padding: 12px;
        gap: 12px;
    }

    .top-nav {
        flex-direction: column;
        gap: 12px;
        padding: 16px;
    }

    .nav-spacer {
        display: none;
    }

    .nav-actions {
        width: 100%;
        justify-content: center;
        flex-wrap: wrap;
    }

    .pro-badge-container {
        width: 100%;
        justify-content: center;
    }

    .calendar-header, .calendar-wrapper, .calendar-footer {
        padding-left: 16px;
        padding-right: 16px;
    }

    .date-section h1 {
        font-size: 22px;
    }

    .chart-section, .wallet-widget {
        padding: 16px;
    }

    .wallet-modal-content, .modal-content {
        padding: 20px;
    }

    .wallet {
        height: 170px;
    }

    .plan-price {
        font-size: 28px;
    }

    .action-buttons {
        flex-direction: column;
        width: 100%;
    }

    .action-btn {
        justify-content: center;
    }

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

    .wallet-widget-stats {
        grid-template-columns: 1fr;
        gap: 8px;
    }

    .wallet-quick-actions {
        flex-direction: column;
    }
}