/* SentinelAuth 管理后台样式 */

:root {
    --bg-primary: #0a1628;
    --bg-secondary: #111d32;
    --bg-tertiary: #1a2942;
    --bg-hover: rgba(37, 99, 235, 0.05);
    --accent-blue: #2563eb;
    --accent-blue-light: #3b82f6;
    --accent-green: #10b981;
    --accent-red: #ef4444;
    --accent-amber: #f59e0b;
    --accent-purple: #8b5cf6;
    --accent-cyan: #06b6d4;
    --accent-orange: #f97316;
    --text-primary: #f8fafc;
    --text-secondary: #e2e8f0;
    --text-muted: #94a3b8;
    --border-color: rgba(255, 255, 255, 0.05);
    --shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.3);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.4);
    --sidebar-width: 260px;
    --sidebar-collapsed: 64px;
    --header-height: 60px;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: var(--bg-primary);
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.5;
}

/* Utility */
.hidden {
    display: none !important;
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--bg-primary) 0%, var(--bg-secondary) 100%);
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 420px;
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.login-header {
    padding: 40px;
    text-align: center;
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(59, 130, 246, 0.05) 100%);
    border-bottom: 1px solid var(--border-color);
}

.login-header .logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 12px;
    margin-bottom: 12px;
}

.login-header .logo i {
    font-size: 36px;
    color: var(--accent-blue);
}

.login-header .logo span {
    font-size: 28px;
    font-weight: 700;
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.login-header p {
    color: var(--text-muted);
    font-size: 14px;
}

.login-form {
    padding: 32px 40px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.login-form label i {
    color: var(--text-muted);
}

.login-form input[type="text"],
.login-form input[type="password"] {
    width: 100%;
    height: 48px;
    padding: 0 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.login-form input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.login-form .remember {
    display: flex;
    align-items: center;
}

.checkbox-label {
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    font-size: 14px;
    color: var(--text-muted);
}

.checkbox-label input {
    width: 18px;
    height: 18px;
    accent-color: var(--accent-blue);
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 44px;
    padding: 0 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, var(--accent-blue), var(--accent-blue-light));
    color: white;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.4);
}

.btn-secondary {
    background: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background: var(--bg-primary);
    border-color: var(--accent-blue);
}

.btn-danger {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.btn-danger:hover {
    background: var(--accent-red);
    color: white;
}

.btn-success {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.btn-success:hover {
    background: var(--accent-green);
    color: white;
}

.login-footer {
    padding: 20px 40px;
    text-align: center;
    border-top: 1px solid var(--border-color);
}

.login-footer p {
    color: var(--text-muted);
    font-size: 12px;
}

/* Main App */
.main-app {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-secondary);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 100;
    transition: width 0.3s ease;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed);
}

.sidebar-header {
    height: var(--header-height);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header .logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.sidebar-header .logo i {
    font-size: 24px;
    color: var(--accent-blue);
    flex-shrink: 0;
}

.sidebar-header .logo span {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .logo span {
    opacity: 0;
    width: 0;
}

.sidebar-toggle {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.sidebar.collapsed .sidebar-toggle {
    display: none;
}

/* Sidebar Nav */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 16px 12px;
}

.nav-section {
    margin-bottom: 24px;
}

.nav-title {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0 12px;
    margin-bottom: 8px;
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .nav-title {
    opacity: 0;
}

.nav-list {
    list-style: none;
}

.nav-item {
    margin-bottom: 4px;
}

.nav-item a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: 8px;
    color: var(--text-muted);
    text-decoration: none;
    transition: all 0.2s ease;
    position: relative;
}

.nav-item a:hover {
    background: var(--bg-hover);
    color: var(--text-secondary);
}

.nav-item.active a {
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-blue);
}

.nav-item i {
    font-size: 18px;
    width: 24px;
    text-align: center;
    flex-shrink: 0;
}

.nav-item span {
    white-space: nowrap;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
}

.nav-item .badge {
    margin-left: auto;
    padding: 2px 8px;
    background: var(--accent-blue);
    color: white;
    font-size: 11px;
    font-weight: 600;
    border-radius: 9999px;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .nav-item .badge {
    opacity: 0;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 16px;
    border-top: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    overflow: hidden;
}

.user-avatar {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-tertiary);
    border-radius: 50%;
    flex-shrink: 0;
}

.user-avatar i {
    font-size: 20px;
    color: var(--text-muted);
}

.user-details {
    display: flex;
    flex-direction: column;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .user-details {
    opacity: 0;
    width: 0;
}

.user-name {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    white-space: nowrap;
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
}

.btn-logout {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.btn-logout:hover {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

/* Main Content */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    transition: margin-left 0.3s ease;
}

.sidebar.collapsed + .main-content {
    margin-left: var(--sidebar-collapsed);
}

/* Top Header */
.top-header {
    height: var(--header-height);
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 50;
}

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

.page-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.btn-icon:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.notifications {
    position: relative;
}

.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 8px;
    height: 8px;
    background: var(--accent-red);
    border-radius: 50%;
}

/* Content Wrapper */
.content-wrapper {
    flex: 1;
    padding: 24px;
    overflow-y: auto;
}

/* Page */
.page {
    display: none;
}

.page.active {
    display: block;
    animation: fadeIn 0.3s ease;
}

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

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(37, 99, 235, 0.3);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}

.stat-icon.blue {
    background: rgba(37, 99, 235, 0.15);
    color: var(--accent-blue);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.stat-icon.purple {
    background: rgba(139, 92, 246, 0.15);
    color: var(--accent-purple);
}

.stat-icon.orange {
    background: rgba(249, 115, 22, 0.15);
    color: var(--accent-orange);
}

.stat-info {
    display: flex;
    flex-direction: column;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Dashboard Grid */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.dashboard-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-header h3 i {
    color: var(--accent-blue);
}

.card-body {
    padding: 20px;
}

/* Alert List */
.alert-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.alert-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-primary);
    border-radius: 8px;
    border-left: 3px solid var(--accent-amber);
}

.alert-item.empty {
    border-left-color: var(--accent-green);
    color: var(--text-muted);
}

.alert-item.empty i {
    color: var(--accent-green);
}

/* Activity List */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.activity-item.empty {
    color: var(--text-muted);
    justify-content: center;
    padding: 40px;
}

/* Page Toolbar */
.page-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
    gap: 16px;
    flex-wrap: wrap;
}

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

.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.search-box {
    position: relative;
}

.search-box i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
}

.search-box input {
    width: 260px;
    height: 40px;
    padding: 0 16px 0 40px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.search-box input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.filter-select,
.filter-date {
    height: 40px;
    padding: 0 12px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.filter-select:focus,
.filter-date:focus {
    outline: none;
    border-color: var(--accent-blue);
}

/* Data Table */
.data-table-wrapper {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
    margin-bottom: 20px;
}

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

.data-table th,
.data-table td {
    padding: 14px 16px;
    text-align: left;
}

.data-table th {
    background: var(--bg-primary);
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    border-bottom: 1px solid var(--border-color);
}

.data-table td {
    border-bottom: 1px solid var(--border-color);
    font-size: 14px;
}

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

.data-table tbody tr:hover {
    background: var(--bg-hover);
}

.data-table tbody tr:nth-child(even) {
    background: rgba(0, 0, 0, 0.1);
}

.data-table tbody tr:nth-child(even):hover {
    background: var(--bg-hover);
}

/* Status Badge */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 9999px;
}

.status-badge::before {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
}

.status-badge.unused {
    background: rgba(59, 130, 246, 0.15);
    color: var(--accent-blue-light);
}

.status-badge.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.status-badge.expired {
    background: rgba(245, 158, 11, 0.15);
    color: var(--accent-amber);
}

.status-badge.banned {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

/* Action Buttons */
.action-btns {
    display: flex;
    gap: 4px;
}

.action-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.action-btn:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

.action-btn.view:hover {
    color: var(--accent-blue);
}

.action-btn.edit:hover {
    color: var(--accent-green);
}

.action-btn.delete:hover {
    color: var(--accent-red);
}

/* Pagination */
.pagination {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
}

.page-btn {
    min-width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    font-size: 14px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.page-btn:hover {
    background: var(--bg-tertiary);
    border-color: var(--accent-blue);
}

.page-btn.active {
    background: var(--accent-blue);
    border-color: var(--accent-blue);
    color: white;
}

.page-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* Apps Grid */
.apps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.app-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    padding: 20px;
    transition: all 0.3s ease;
}

.app-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: rgba(37, 99, 235, 0.3);
}

.app-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 16px;
}

.app-card-icon {
    width: 48px;
    height: 48px;
    background: rgba(37, 99, 235, 0.15);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: var(--accent-blue);
}

.app-card-status {
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 500;
    border-radius: 9999px;
}

.app-card-status.active {
    background: rgba(16, 185, 129, 0.15);
    color: var(--accent-green);
}

.app-card-status.inactive {
    background: rgba(239, 68, 68, 0.15);
    color: var(--accent-red);
}

.app-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
}

.app-card-desc {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 16px;
    line-height: 1.5;
}

.app-card-meta {
    display: flex;
    gap: 16px;
    font-size: 12px;
    color: var(--text-muted);
}

.app-card-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

/* Chart Grid */
.chart-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.chart-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.chart-container {
    padding: 20px;
    height: 300px;
}

/* Settings */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
}

.settings-card {
    background: var(--bg-secondary);
    border-radius: 12px;
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.settings-form {
    padding: 20px;
}

.settings-form .form-group {
    margin-bottom: 16px;
}

.settings-form label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.settings-form input {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.settings-form input:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.info-list {
    padding: 20px;
}

.info-item {
    display: flex;
    justify-content: space-between;
    padding: 12px 0;
    border-bottom: 1px solid var(--border-color);
}

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

.info-item .label {
    color: var(--text-muted);
}

.info-item .value {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

/* Modal */
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 20px;
}

.modal {
    background: var(--bg-secondary);
    border-radius: 16px;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    max-width: 520px;
    width: 100%;
    max-height: 90vh;
    overflow: auto;
    animation: modalSlideUp 0.3s ease;
}

.modal-lg {
    max-width: 720px;
}

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

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

.modal-header h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.modal-header h3 i {
    color: var(--accent-blue);
}

.btn-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.2s ease;
}

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

.modal-body {
    padding: 24px;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* Form in Modal */
.modal .form-group {
    margin-bottom: 16px;
}

.modal .form-group:last-child {
    margin-bottom: 0;
}

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

.modal label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.modal label .required {
    color: var(--accent-red);
}

.modal input[type="text"],
.modal input[type="number"],
.modal input[type="password"],
.modal select,
.modal textarea {
    width: 100%;
    height: 44px;
    padding: 0 16px;
    background: var(--bg-primary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.modal textarea {
    height: auto;
    padding: 12px 16px;
    resize: vertical;
}

.modal input:focus,
.modal select:focus,
.modal textarea:focus {
    outline: none;
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

.modal .hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 4px;
}

.checkbox-group {
    display: flex;
    align-items: flex-end;
    padding-bottom: 8px;
}

/* License Detail */
.license-detail {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.detail-section {
    background: var(--bg-primary);
    border-radius: 10px;
    padding: 16px;
}

.detail-section h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-muted);
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid var(--border-color);
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row .label {
    color: var(--text-muted);
}

.detail-row .value {
    color: var(--text-primary);
    font-family: 'JetBrains Mono', monospace;
}

/* Toast */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.toast {
    padding: 16px 20px;
    background: var(--bg-secondary);
    border-radius: 10px;
    border-left: 4px solid var(--accent-blue);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 12px;
    min-width: 280px;
    animation: toastSlideIn 0.3s ease;
}

.toast.success {
    border-color: var(--accent-green);
}

.toast.error {
    border-color: var(--accent-red);
}

.toast.warning {
    border-color: var(--accent-amber);
}

@keyframes toastSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.toast-icon {
    font-size: 20px;
}

.toast.success .toast-icon {
    color: var(--accent-green);
}

.toast.error .toast-icon {
    color: var(--accent-red);
}

.toast.warning .toast-icon {
    color: var(--accent-amber);
}

.toast-message {
    flex: 1;
    font-size: 14px;
}

.toast-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .dashboard-grid,
    .chart-grid,
    .settings-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .page-toolbar {
        flex-direction: column;
        align-items: stretch;
    }
    
    .toolbar-left,
    .toolbar-right {
        width: 100%;
    }
    
    .search-box input {
        width: 100%;
    }
    
    .data-table-wrapper {
        overflow-x: auto;
    }
    
    .data-table {
        min-width: 800px;
    }
    
    .modal .form-row {
        grid-template-columns: 1fr;
    }
}
