/* ==============================================================================
   AION NFC CARDS - PREMIUM RESPONSIVE STYLESHEET
   Apple/Fintech Inspired UI/UX, Hardware-Accelerated Smooth Animations
   ============================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@500;700&display=swap');

:root {
    --primary: #d4af37;
    --primary-glow: rgba(212, 175, 55, 0.35);
    --primary-hover: #b89728;
    --secondary: #0b0f19;
    --accent: #38bdf8;
    --accent-glow: rgba(56, 189, 248, 0.3);
    --bg: #080c14;
    --surface: #111827;
    --surface-light: #162032;
    --surface-glass: rgba(17, 24, 39, 0.85);
    --text: #ffffff;
    --text-muted: #94a3b8;
    --border: rgba(255, 255, 255, 0.08);
    --border-glass: rgba(255, 255, 255, 0.08);
    --danger: #ef4444;
    --success: #10b981;
    --warning: #f59e0b;
    --radius-sm: 8px;
    --radius: 14px;
    --radius-lg: 20px;
    --radius-full: 9999px;
    --font: 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-mono: 'JetBrains Mono', monospace;
    --container: 1200px;
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.25);
    --shadow: 0 12px 30px -8px rgba(0, 0, 0, 0.5), 0 4px 12px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 25px rgba(99, 102, 241, 0.25);
    --transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

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

body {
    font-family: var(--font);
    background-color: var(--bg);
    color: var(--text);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
}

/* -----------------------------------------------------------------------------
   KEYFRAME ANIMATIONS
   ----------------------------------------------------------------------------- */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(8px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes float {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-8px) rotate(0.5deg); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 15px rgba(99, 102, 241, 0.3); }
    50% { box-shadow: 0 0 30px rgba(99, 102, 241, 0.6); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.animate-fade-in {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.animate-float {
    animation: float 5s ease-in-out infinite;
}

/* -----------------------------------------------------------------------------
   TYPOGRAPHY
   ----------------------------------------------------------------------------- */
h1, h2, h3, h4, h5, h6 {
    color: var(--text);
    line-height: 1.25;
    font-weight: 800;
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.5rem); }
h2 { font-size: clamp(1.6rem, 3.5vw, 2.4rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.6rem); }

p {
    color: var(--text-muted);
    font-size: 1rem;
}

a {
    color: var(--accent);
    text-decoration: none;
    transition: var(--transition);
}
a:hover {
    color: #fff;
}

/* Container */
.container {
    width: 100%;
    max-width: var(--container);
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* -----------------------------------------------------------------------------
   NAVIGATION & HEADER
   ----------------------------------------------------------------------------- */
.navbar {
    background-color: rgba(9, 13, 22, 0.85);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border-glass);
    position: sticky;
    top: 0;
    z-index: 100;
    transition: var(--transition);
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 76px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-weight: 800;
    font-size: 1.25rem;
    letter-spacing: -0.5px;
    color: var(--text);
}

.logo-badge {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: #fff;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    font-size: 0.75rem;
    font-weight: 800;
    letter-spacing: 0.5px;
    text-transform: uppercase;
    box-shadow: 0 4px 12px var(--primary-glow);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 1.75rem;
    list-style: none;
}

.nav-links a {
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.95rem;
}
.nav-links a:hover, .nav-links a.active {
    color: #fff;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1.6rem;
    cursor: pointer;
}

/* -----------------------------------------------------------------------------
   BUTTONS & MICRO-INTERACTIONS
   ----------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1.6rem;
    font-size: 0.95rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: var(--transition);
    text-align: center;
    white-space: nowrap;
    position: relative;
    user-select: none;
}

.btn:active {
    transform: scale(0.98);
}

.btn-primary {
    background: linear-gradient(135deg, #d4af37 0%, #f59e0b 100%);
    color: #080c14 !important;
    font-weight: 800;
    box-shadow: 0 4px 18px var(--primary-glow);
}
.btn-primary:hover {
    background: linear-gradient(135deg, #e5c07b 0%, #d4af37 100%);
    box-shadow: 0 8px 26px var(--primary-glow);
    transform: translateY(-2px);
    color: #000000 !important;
}

.btn-secondary {
    background-color: var(--surface-light);
    color: var(--text);
    border-color: var(--border);
}
.btn-secondary:hover {
    background-color: #374151;
    transform: translateY(-2px);
    color: #fff;
}

.btn-outline {
    background: rgba(255, 255, 255, 0.03);
    color: var(--text);
    border-color: var(--border);
}
.btn-outline:hover {
    background: var(--surface-light);
    border-color: var(--text-muted);
    color: #fff;
    transform: translateY(-2px);
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: #fff;
    box-shadow: 0 4px 14px rgba(239, 68, 68, 0.35);
}
.btn-danger:hover {
    background: #dc2626;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 0.45rem 0.95rem;
    font-size: 0.85rem;
}

.btn-pill {
    border-radius: var(--radius-full);
}

/* -----------------------------------------------------------------------------
   CARDS & SURFACES (GLASSMORPHISM)
   ----------------------------------------------------------------------------- */
.card {
    background-color: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(99, 102, 241, 0.3);
}

.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; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }

/* Badges */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.25rem 0.65rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}
.badge-success { background: rgba(16, 185, 129, 0.15); color: #34d399; border: 1px solid rgba(16, 185, 129, 0.3); }
.badge-warning { background: rgba(245, 158, 11, 0.15); color: #fbbf24; border: 1px solid rgba(245, 158, 11, 0.3); }
.badge-danger { background: rgba(239, 68, 68, 0.15); color: #f87171; border: 1px solid rgba(239, 68, 68, 0.3); }
.badge-primary { background: rgba(99, 102, 241, 0.15); color: #818cf8; border: 1px solid rgba(99, 102, 241, 0.3); }

/* Forms */
.form-group {
    margin-bottom: 1.25rem;
}
.form-label {
    display: block;
    margin-bottom: 0.45rem;
    font-size: 0.88rem;
    font-weight: 700;
    color: var(--text);
}
.form-control {
    width: 100%;
    padding: 0.75rem 1rem;
    font-size: 0.95rem;
    background-color: var(--bg);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    color: var(--text);
    outline: none;
    transition: var(--transition);
}
.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.25);
}

/* Tables */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}
.table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}
.table th, .table td {
    padding: 1rem 1.2rem;
    border-bottom: 1px solid var(--border);
    font-size: 0.92rem;
}
.table th {
    background-color: var(--surface-light);
    color: var(--text-muted);
    font-weight: 700;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.75px;
}
.table tr:hover td {
    background-color: rgba(255, 255, 255, 0.02);
}

/* Alerts */
.alert {
    padding: 1rem 1.4rem;
    border-radius: var(--radius-sm);
    margin-bottom: 1.5rem;
    font-size: 0.95rem;
    font-weight: 500;
    animation: fadeIn 0.3s ease;
}
.alert-success { background: rgba(16, 185, 129, 0.12); border: 1px solid #10b981; color: #a7f3d0; }
.alert-danger { background: rgba(239, 68, 68, 0.12); border: 1px solid #ef4444; color: #fecaca; }
.alert-info { background: rgba(56, 189, 248, 0.12); border: 1px solid #38bdf8; color: #bae6fd; }

/* Dashboard layout */
.app-layout {
    display: flex;
    min-height: 100vh;
}
.app-sidebar {
    width: 270px;
    background-color: var(--surface);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
}
.sidebar-header {
    height: 76px;
    padding: 0 1.5rem;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
}
.sidebar-menu {
    list-style: none;
    padding: 1.25rem 0.85rem;
    flex: 1;
}
.sidebar-menu li {
    margin-bottom: 0.3rem;
}
.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    padding: 0.75rem 1rem;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.92rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}
.sidebar-menu a:hover, .sidebar-menu a.active {
    background-color: var(--surface-light);
    color: #fff;
    transform: translateX(3px);
}
.sidebar-menu a.active {
    background: rgba(99, 102, 241, 0.15);
    color: #818cf8;
    font-weight: 700;
}
.app-main {
    flex: 1;
    background-color: var(--bg);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
}
.app-header {
    height: 76px;
    padding: 0 2.25rem;
    background-color: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.app-content {
    padding: 2.25rem;
    flex: 1;
    animation: fadeIn 0.35s ease;
}

/* iOS Style Switch */
.ios-switch {
    position: relative;
    display: inline-block;
    width: 48px;
    height: 26px;
    cursor: pointer;
}
.ios-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.ios-slider {
    position: absolute;
    inset: 0;
    background-color: #374151;
    border-radius: 34px;
    transition: 0.3s;
}
.ios-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    border-radius: 50%;
    transition: 0.3s;
}
.ios-switch input:checked + .ios-slider {
    background-color: var(--success);
}
.ios-switch input:checked + .ios-slider:before {
    transform: translateX(22px);
}

/* Responsive adjustments */
@media (max-width: 992px) {
    .grid-4 { grid-template-columns: repeat(2, 1fr); }
    .grid-3 { grid-template-columns: 1fr; }
    .app-layout { flex-direction: column; }
    .app-sidebar { width: 100%; border-right: none; border-bottom: 1px solid var(--border); }
    .nav-links { display: none; }
    .mobile-toggle { display: block; }
}

@media (max-width: 640px) {
    .grid-2 { grid-template-columns: 1fr; }
    .grid-4 { grid-template-columns: 1fr; }
    .app-header, .app-content { padding: 1.25rem; }
}
