* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
}

/* Login Page */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.login-box {
    background: white;
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    width: 100%;
    max-width: 400px;
    text-align: center;
}

.login-box h1 {
    font-size: 32px;
    margin-bottom: 10px;
    color: #333;
}

.login-box p {
    color: #666;
    margin-bottom: 30px;
}

/* Admin Layout */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    box-shadow: 2px 0 10px rgba(0,0,0,0.1);
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
}

.sidebar-header {
    padding: 25px 20px;
    background: rgba(0,0,0,0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-header h2 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 12px;
    color: rgba(255,255,255,0.7);
}

.sidebar-nav {
    padding: 20px 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: rgba(255,255,255,0.9);
    cursor: pointer;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: #3498db;
}

.nav-item.active {
    background: rgba(52, 152, 219, 0.2);
    border-left-color: #3498db;
    color: white;
}

.nav-item-icon {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
    text-align: center;
}

.nav-item-text {
    flex: 1;
    font-size: 14px;
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: 280px;
    min-height: 100vh;
}

.top-bar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.top-bar h1 {
    font-size: 24px;
    color: #2c3e50;
    font-weight: 600;
    margin: 0;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-email {
    color: #666;
    font-size: 14px;
}

.btn-logout {
    padding: 8px 16px;
    background: #e74c3c;
    color: white;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.3s;
}

.btn-logout:hover {
    background: #c0392b;
}

/* Container */
.container {
    padding: 30px;
    max-width: 1400px;
    margin: 0 auto;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #333;
}

.form-group input, .form-control {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 10px;
    font-size: 14px;
}

.form-group input:focus, .form-control:focus {
    outline: none;
    border-color: #667eea;
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 14px;
    transition: all 0.3s;
}

.btn-primary {
    background: #667eea;
    color: white;
}

.btn-primary:hover {
    background: #5568d3;
}

.btn-success {
    background: #28a745;
    color: white;
}

.btn-danger {
    background: #dc3545;
    color: white;
}

.btn-danger:hover {
    background: #c82333;
}

.btn-block {
    width: 100%;
    padding: 15px;
    font-size: 16px;
}

.btn-logout {
    background: rgba(255,255,255,0.2);
    border: 1px solid white;
    color: white;
    padding: 8px 20px;
    border-radius: 20px;
    cursor: pointer;
}

.btn-logout:hover {
    background: white;
    color: #667eea;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin: 20px 0;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.stat-card h3 {
    color: #666;
    font-size: 14px;
    margin-bottom: 10px;
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: #667eea;
}

/* Table */
table {
    width: 100%;
    background: white;
    border-radius: 15px;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

th {
    background: #667eea;
    color: white;
    padding: 15px;
    text-align: left;
}

td {
    padding: 15px;
    border-bottom: 1px solid #eee;
}

td:last-child {
    white-space: nowrap;
}

tr:hover {
    background: #f9f9f9;
}

/* Status Badge */
.status-badge {
    padding: 5px 15px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
}

.status-active {
    background: #d4edda;
    color: #155724;
}

.status-banned {
    background: #f8d7da;
    color: #721c24;
}

.status-pending {
    background: #fff3cd;
    color: #856404;
}

.status-verified {
    background: #d1fae5;
    color: #065f46;
}

.status-rejected {
    background: #fee2e2;
    color: #991b1b;
}

.status-unverified {
    background: #f3f4f6;
    color: #374151;
}

/* Card */
.card {
    background: white;
    padding: 25px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

/* Error/Success */
.error {
    background: #fee;
    border: 1px solid #fcc;
    color: #c33;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

.success {
    background: #d4edda;
    border: 1px solid #c3e6cb;
    color: #155724;
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
}

/* Search */
.search-box {
    padding: 10px 15px;
    border: 2px solid #ddd;
    border-radius: 10px;
    width: 300px;
}

.header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

/* Modal */
.modal {
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
}

.modal-content {
    background: white;
    margin: 50px auto;
    padding: 30px;
    border-radius: 15px;
    width: 90%;
    max-width: 600px;
    max-height: 80vh;
    overflow-y: auto;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
}

.close:hover {
    color: #000;
}

/* Tabs */
.tabs {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.tab-btn {
    padding: 10px 20px;
    border: 2px solid #667eea;
    background: white;
    color: #667eea;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s;
}

.tab-btn.active, .tab-btn:hover {
    background: #667eea;
    color: white;
}

/* Small buttons in tables */
.btn-small {
    padding: 6px 12px;
    font-size: 12px;
    margin: 2px;
    display: inline-block;
    white-space: nowrap;
}

/* Toggle Switch */
.switch {
    position: relative;
    display: inline-block;
    width: 60px;
    height: 34px;
}

.switch input {
    opacity: 0;
    width: 0;
    height: 0;
}

.slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #ccc;
    transition: .4s;
    border-radius: 34px;
}

.slider:before {
    position: absolute;
    content: "";
    height: 26px;
    width: 26px;
    left: 4px;
    bottom: 4px;
    background-color: white;
    transition: .4s;
    border-radius: 50%;
}

input:checked + .slider {
    background-color: #28a745;
}

input:checked + .slider:before {
    transform: translateX(26px);
}

/* Trade Type Cards */
.trade-type-card {
    transition: all 0.3s ease;
}

.trade-type-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}

/* Settings Sections */
.settings-section {
    background: white;
    padding: 30px;
    border-radius: 15px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.settings-section-header {
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.settings-section-header h3 {
    margin: 0 0 8px 0;
    color: #333;
    font-size: 22px;
    font-weight: 700;
}

.section-description {
    margin: 0;
    color: #666;
    font-size: 14px;
}

.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.trade-settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 18px;
}

.form-group small {
    display: block;
    margin-top: 6px;
    color: #666;
    font-size: 12px;
    line-height: 1.4;
}

/* Withdrawal Details */
.detail-card {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 20px;
    margin-top: 10px;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid #e0e0e0;
    align-items: flex-start;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-label {
    font-weight: 600;
    color: #555;
    min-width: 150px;
    flex-shrink: 0;
}

.detail-value {
    text-align: right;
    color: #333;
    flex-grow: 1;
    margin-left: 15px;
}

.btn-info {
    background: #3498db;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 5px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 5px;
}

.btn-info:hover {
    background: #2980b9;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    overflow: auto;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: #fefefe;
    margin: 5% auto;
    padding: 0;
    border: none;
    border-radius: 10px;
    width: 90%;
    max-width: 900px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.3);
    animation: modalFadeIn 0.3s;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    padding: 10px 15px;
    cursor: pointer;
}

.close:hover,
.close:focus {
    color: #000;
    text-decoration: none;
}

/* NASDAQ dark admin redesign */
:root {
    --admin-bg: #070b14;
    --admin-panel: #0b1020;
    --admin-panel-2: #111827;
    --admin-line: rgba(255, 255, 255, 0.1);
    --admin-line-strong: rgba(255, 255, 255, 0.16);
    --admin-text: #eef4ff;
    --admin-muted: #95a3b8;
    --admin-blue: #38bdf8;
    --admin-blue-2: #2563eb;
    --admin-green: #22c55e;
    --admin-red: #ef4444;
    --admin-yellow: #facc15;
}

html,
body {
    background: var(--admin-bg) !important;
    color: var(--admin-text);
}

.admin-layout {
    background: var(--admin-bg);
}

.sidebar {
    background: linear-gradient(180deg, #080d18 0%, #0d1524 55%, #09101d 100%) !important;
    border-right: 1px solid var(--admin-line);
    box-shadow: 16px 0 40px rgba(0, 0, 0, 0.24);
}

.sidebar-header {
    background: rgba(255, 255, 255, 0.02) !important;
    border-bottom: 1px solid var(--admin-line);
    padding: 28px 22px;
}

.sidebar-header h2 {
    color: #ffffff;
    letter-spacing: 0;
}

.sidebar-header p {
    color: var(--admin-muted);
}

.sidebar-nav {
    padding: 14px 10px;
}

.nav-item {
    gap: 12px;
    min-height: 44px;
    margin: 4px 0;
    padding: 11px 14px;
    border: 1px solid transparent;
    border-radius: 8px;
    border-left: 1px solid transparent;
    color: #cbd5e1;
}

.nav-item:hover {
    background: rgba(56, 189, 248, 0.08);
    border-color: rgba(56, 189, 248, 0.16);
}

.nav-item.active {
    background: rgba(37, 99, 235, 0.18);
    border-color: rgba(56, 189, 248, 0.32);
    color: #ffffff;
}

.nav-item-icon {
    width: 28px;
    height: 28px;
    margin-right: 0;
    border-radius: 7px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.04);
    color: var(--admin-blue);
}

.ui-icon,
.btn-icon,
.badge-icon {
    width: 17px;
    height: 17px;
    fill: none;
    stroke: currentColor;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    flex: 0 0 auto;
}

.btn-icon,
.badge-icon {
    width: 14px;
    height: 14px;
    margin-right: 6px;
    vertical-align: -2px;
}

.main-content {
    background: transparent;
}

.top-bar {
    background: rgba(11, 16, 32, 0.92) !important;
    border-bottom: 1px solid var(--admin-line);
    box-shadow: none;
    backdrop-filter: blur(12px);
    min-height: 64px;
}

.top-bar h1,
.container h2 {
    color: var(--admin-text) !important;
    letter-spacing: 0;
}

.user-email,
.section-description,
.form-group small {
    color: var(--admin-muted) !important;
}

.container {
    max-width: none;
    padding: 28px;
}

.card,
.stat-card,
.settings-section,
.detail-card,
.modal-content,
.login-box {
    background: var(--admin-panel) !important;
    border: 1px solid var(--admin-line);
    color: var(--admin-text);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.28);
}

.stat-card {
    border-radius: 8px;
    padding: 22px;
}

.stat-card h3,
.form-group label,
.detail-label,
.settings-section-header h3 {
    color: #dbe7ff !important;
}

.stat-value {
    color: var(--admin-blue);
}

table {
    background: var(--admin-panel) !important;
    border: 1px solid var(--admin-line);
    border-collapse: separate;
    border-spacing: 0;
    box-shadow: 0 16px 42px rgba(0, 0, 0, 0.24);
    overflow: hidden;
    min-width: 720px;
}

.container > div,
.modal-content > div {
    max-width: 100%;
}

.container > div[id$="Content"],
.modal-content > div {
    overflow-x: auto;
}

th {
    background: #101a2e !important;
    color: #dce8ff;
    border-bottom: 1px solid var(--admin-line-strong);
    font-weight: 700;
}

td {
    color: #d7e1f2;
    border-bottom: 1px solid var(--admin-line);
}

tr:hover {
    background: rgba(56, 189, 248, 0.05) !important;
}

td code {
    background: rgba(255, 255, 255, 0.06) !important;
    color: #dbeafe;
}

.form-group input,
.form-control,
.search-box,
select,
textarea,
input {
    background: #0a1221 !important;
    border: 1px solid var(--admin-line-strong) !important;
    color: var(--admin-text) !important;
    border-radius: 8px !important;
}

.form-group input:focus,
.form-control:focus,
.search-box:focus {
    border-color: rgba(56, 189, 248, 0.7) !important;
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.12);
}

.btn,
.btn-small,
.btn-logout,
.tab-btn {
    border-radius: 7px !important;
    border: 1px solid transparent;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    font-weight: 700;
    letter-spacing: 0;
}

.btn-primary,
.btn-info {
    background: #2563eb !important;
    color: white !important;
}

.btn-success {
    background: rgba(34, 197, 94, 0.16) !important;
    border-color: rgba(34, 197, 94, 0.32) !important;
    color: #86efac !important;
}

.btn-danger {
    background: rgba(239, 68, 68, 0.16) !important;
    border-color: rgba(239, 68, 68, 0.32) !important;
    color: #fecaca !important;
}

.action-decision-btn {
    min-width: 86px;
    min-height: 30px;
    padding: 7px 10px !important;
    white-space: nowrap;
}

.action-decision-btn .btn-icon {
    width: 14px;
    height: 14px;
}

.btn-logout {
    background: rgba(239, 68, 68, 0.12) !important;
    border-color: rgba(239, 68, 68, 0.28) !important;
    color: #fecaca !important;
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    border-radius: 999px;
    border: 1px solid transparent;
    padding: 5px 11px;
}

.status-active,
.status-verified {
    background: rgba(34, 197, 94, 0.14) !important;
    border-color: rgba(34, 197, 94, 0.26);
    color: #86efac !important;
}

.status-banned,
.status-rejected {
    background: rgba(239, 68, 68, 0.14) !important;
    border-color: rgba(239, 68, 68, 0.26);
    color: #fecaca !important;
}

.status-pending {
    background: rgba(250, 204, 21, 0.14) !important;
    border-color: rgba(250, 204, 21, 0.28);
    color: #fde68a !important;
}

.status-unverified {
    background: rgba(148, 163, 184, 0.12) !important;
    border-color: rgba(148, 163, 184, 0.22);
    color: #cbd5e1 !important;
}

.modal {
    background: rgba(2, 6, 23, 0.74) !important;
    backdrop-filter: blur(8px);
}

.close:hover,
.close:focus {
    color: #ffffff;
}

.detail-row {
    border-bottom-color: var(--admin-line);
}

.detail-value {
    color: #e2e8f0;
}

[style*="background: #ffffff"],
[style*="background: white"],
[style*="background: #f5f5f5"],
[style*="background: #f9f9f9"],
[style*="background:#ffffff"],
[style*="background:white"] {
    background: var(--admin-panel-2) !important;
}

[style*="border: 1px solid #e0e0e0"],
[style*="border: 2px solid #e0e0e0"],
[style*="border: 2px solid #ddd"],
[style*="border-bottom: 2px solid #e0e0e0"],
[style*="border-bottom: 2px solid #d0d0d0"] {
    border-color: var(--admin-line-strong) !important;
}

[style*="color: #333"],
[style*="color:#333"],
[style*="color: #555"] {
    color: var(--admin-text) !important;
}

[style*="color: #666"],
[style*="color:#666"],
[style*="color: #999"] {
    color: var(--admin-muted) !important;
}

[style*="font-family: monospace"][style*="background"] {
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid var(--admin-line-strong);
    color: #dbeafe !important;
}

.login-container {
    background: var(--admin-bg) !important;
}

.login-box {
    border-radius: 10px;
}

.login-box h1 {
    color: var(--admin-text);
}

.login-box p {
    color: var(--admin-muted);
}

.admin-motion-layer {
    position: fixed;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
    opacity: 0.42;
}

.admin-motion-layer::before {
    content: "";
    position: absolute;
    inset: -48px;
    background-image:
        linear-gradient(rgba(56, 189, 248, 0.045) 1px, transparent 1px),
        linear-gradient(90deg, rgba(56, 189, 248, 0.045) 1px, transparent 1px);
    background-size: 48px 48px;
    animation: adminGridDrift 24s linear infinite;
}

.admin-layout,
.login-container {
    position: relative;
    z-index: 1;
}

@keyframes adminGridDrift {
    to {
        transform: translate3d(48px, 48px, 0);
    }
}

.page,
.container > div,
.card,
.stat-card,
table {
    animation: adminRise 0.34s ease both;
}

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

.nav-item,
.btn,
.stat-card,
tr,
.card {
    transition: transform 0.18s ease, background-color 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease, color 0.18s ease;
}

.nav-item:hover {
    transform: translateX(3px);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

.stat-card:hover,
.card:hover {
    transform: translateY(-2px);
    border-color: rgba(56, 189, 248, 0.22);
}

body.modal-open {
    overflow: hidden;
}

.nav-item {
    width: 100%;
    font: inherit;
    text-align: left;
}

.admin-page-fragment {
    width: 100%;
    min-width: 0;
}

.admin-page-fragment > h2,
.page-heading-row {
    margin-bottom: 20px;
}

.container > div[id$="Content"] {
    min-width: 0;
    overflow: visible;
}

.table-shell {
    width: 100%;
    min-width: 0;
    min-height: 120px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scrollbar-color: rgba(148, 163, 184, 0.5) transparent;
}

.sidebar .nav-item {
    background: #0f172a !important;
    border: 1px solid rgba(56, 189, 248, 0.12) !important;
    border-left: 3px solid transparent !important;
    border-radius: 8px !important;
    color: #cbd5e1 !important;
    margin: 4px 10px !important;
    padding: 14px 16px !important;
    width: calc(100% - 20px) !important;
    box-shadow: none !important;
}

.sidebar .nav-item:hover {
    background: #111f36 !important;
    border-color: rgba(56, 189, 248, 0.34) !important;
    color: #ffffff !important;
}

.sidebar .nav-item.active {
    background: #102044 !important;
    border-color: rgba(37, 99, 235, 0.78) !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.16) !important;
}

.sidebar .nav-item-icon {
    color: #38bdf8 !important;
}

.sidebar .nav-item-text {
    color: inherit !important;
}

.table-shell table {
    margin: 0;
    border-radius: 8px;
}

.settings-page-content {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
}

.search-field {
    min-width: 0;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.developer-card {
    margin-top: 34px;
    padding: 0;
    overflow: hidden;
    border-radius: 8px;
}

.developer-card-header {
    display: flex;
    align-items: center;
    gap: 18px;
    padding: 24px 26px;
    border-bottom: 1px solid var(--admin-line);
}

.developer-card-header h3 {
    margin: 0;
    color: var(--admin-text);
    font-size: 22px;
}

.developer-card-header p {
    margin: 5px 0 0;
    color: var(--admin-muted);
}

.developer-avatar {
    width: 68px;
    height: 68px;
    flex: 0 0 68px;
    overflow: hidden;
    display: grid;
    place-items: center;
    border: 1px solid var(--admin-line-strong);
    border-radius: 8px;
    background: #111827;
}

.developer-avatar img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-placeholder {
    color: var(--admin-blue);
    font-size: 28px;
    font-weight: 800;
}

.developer-card-body {
    padding: 24px 26px;
}

.developer-card-body h4 {
    margin: 0 0 12px;
    color: var(--admin-text);
}

.developer-contact-list {
    margin: 0;
}

.developer-contact-list > div {
    display: grid;
    grid-template-columns: minmax(100px, 150px) minmax(0, 1fr);
    gap: 16px;
    padding: 12px 0;
    border-bottom: 1px solid var(--admin-line);
}

.developer-contact-list > div:last-child {
    border-bottom: 0;
}

.developer-contact-list dt {
    color: var(--admin-muted);
}

.developer-contact-list dd {
    min-width: 0;
    margin: 0;
    color: var(--admin-text);
    overflow-wrap: anywhere;
}

.developer-contact-list a {
    color: #4ade80;
}

.developer-card-footer {
    display: flex;
    justify-content: space-between;
    gap: 16px;
    padding: 15px 26px;
    border-top: 1px solid var(--admin-line);
    color: var(--admin-muted);
    font-size: 12px;
}

.generate-code-card {
    width: min(600px, 100%);
    border-radius: 8px;
}

.generated-code-result {
    display: none;
    margin-top: 20px;
}

.generated-code-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    gap: 10px;
    margin-top: 10px;
}

.page-load-error {
    padding: 18px;
    border: 1px solid rgba(239, 68, 68, 0.35);
    border-radius: 8px;
    background: rgba(239, 68, 68, 0.1);
    color: #fecaca;
}

.card,
.login-box,
.modal-content {
    border-radius: 8px !important;
}

.modal-content img,
.modal-content video,
.modal-content iframe {
    max-width: 100%;
}

.modal-content > div:not(.close) {
    min-height: 0;
    overscroll-behavior: contain;
}

.modal {
    align-items: center;
    justify-content: center;
    padding: 24px;
    overflow: hidden !important;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.18s ease, visibility 0.18s ease;
}

.modal.is-open {
    opacity: 1;
    visibility: visible;
}

.modal.is-closing {
    opacity: 0;
    visibility: visible;
}

.modal-content {
    width: min(960px, calc(100vw - 32px)) !important;
    max-width: min(960px, calc(100vw - 32px)) !important;
    max-height: calc(100vh - 48px) !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
    overflow: hidden !important;
    border-radius: 10px !important;
    animation: modalEnter 0.22s cubic-bezier(0.2, 0.8, 0.2, 1) both !important;
    position: relative;
}

.modal.is-closing .modal-content {
    animation: modalExit 0.18s ease both !important;
}

.modal-content > h2 {
    padding: 24px 28px 14px;
    margin: 0;
    flex: 0 0 auto;
}

.modal-content > div:not(.close) {
    overflow: auto;
    padding: 0 28px 28px;
}

.modal-content .close {
    position: absolute;
    top: 14px;
    right: 18px;
    width: 36px;
    height: 36px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.06);
    z-index: 2;
}

@keyframes modalEnter {
    from {
        opacity: 0;
        transform: translateY(16px) scale(0.98);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

@keyframes modalExit {
    from {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
    to {
        opacity: 0;
        transform: translateY(10px) scale(0.98);
    }
}

@media (max-width: 820px) {
    .admin-layout {
        display: block;
    }

    .main-content {
        margin-left: 0;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
        transform: none;
        overflow: hidden;
    }

    .sidebar-header {
        padding: 16px 18px;
    }

    .sidebar-nav {
        display: flex;
        gap: 7px;
        padding: 10px 12px;
        overflow-x: auto;
    }

    .nav-item {
        width: auto;
        min-width: max-content;
        flex: 0 0 auto;
        margin: 0;
        padding: 9px 12px;
    }

    .top-bar {
        padding: 14px 18px;
        gap: 12px;
        flex-wrap: wrap;
    }

    .container {
        padding: 18px;
    }

    .page-heading-row {
        align-items: stretch;
        flex-direction: column;
    }

    .search-box {
        width: 100%;
    }

    .developer-card-footer {
        flex-direction: column;
    }

    .modal {
        padding: 12px;
    }

    .modal-content {
        width: calc(100vw - 24px) !important;
        max-height: calc(100vh - 24px) !important;
    }
}

@media (max-width: 520px) {
    .user-info {
        width: 100%;
        justify-content: space-between;
    }

    .user-email {
        min-width: 0;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .developer-card-header {
        align-items: flex-start;
        padding: 20px;
    }

    .developer-card-body,
    .developer-card-footer {
        padding-left: 20px;
        padding-right: 20px;
    }

    .developer-contact-list > div {
        grid-template-columns: 1fr;
        gap: 4px;
    }

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

    .detail-row {
        flex-direction: column;
        gap: 6px;
    }

    .detail-label {
        min-width: 0;
    }

    .detail-value {
        width: 100%;
        margin-left: 0;
        text-align: left;
        overflow-wrap: anywhere;
    }

    .modal-content > h2 {
        padding: 20px 54px 12px 20px;
        font-size: 18px;
    }

    .modal-content > div:not(.close) {
        padding: 0 20px 20px;
    }
}

@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.001ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.001ms !important;
        scroll-behavior: auto !important;
    }
}
