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

body { font-family: system-ui, -apple-system, sans-serif; font-size: 14px;
       background: #f5f5f3; color: #1a1a18; }

.layout { display: flex; min-height: 100vh; }

.sidebar { width: 210px; background: #ffffff; border-right: 1px solid #e5e5e0;
           display: flex; flex-direction: column; flex-shrink: 0; padding: 0; }
.logo { padding: 16px; font-size: 15px; font-weight: 500;
        border-bottom: 1px solid #e5e5e0; display: flex; align-items: center; gap: 8px; }
.nav-section { font-size: 11px; color: #888; padding: 12px 16px 4px;
               text-transform: uppercase; letter-spacing: 0.05em; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 8px 14px;
            color: #555; text-decoration: none; font-size: 13px; border-radius: 0; }
.nav-item:hover { background: #f5f5f3; color: #1a1a18; }
.nav-item.active { background: #f0f0ee; color: #1a1a18; font-weight: 500; }
.nav-item i { font-size: 16px; }

.main { flex: 1; display: flex; flex-direction: column; overflow: auto; }

.topbar { display: flex; align-items: center; justify-content: space-between;
          padding: 14px 24px; background: #fff; border-bottom: 1px solid #e5e5e0; }
.topbar h1 { font-size: 16px; font-weight: 500; }
.topbar-actions { display: flex; gap: 8px; }

.metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px;
           padding: 16px 24px 0; }
.metric { background: #fff; border: 1px solid #e5e5e0; border-radius: 8px; padding: 14px 16px; }
.metric-label { font-size: 12px; color: #888; margin-bottom: 4px; }
.metric-value { font-size: 24px; font-weight: 500; }

.filters { display: flex; align-items: center; gap: 8px; padding: 14px 24px;
           flex-wrap: wrap; }
.search-input, .filters select {
    font-size: 13px; padding: 6px 10px; border: 1px solid #e5e5e0;
    border-radius: 6px; background: #fff; color: #1a1a18; }
.search-input { width: 200px; }

.btn { font-size: 12px; padding: 6px 12px; border-radius: 6px;
       border: 1px solid #e5e5e0; background: #fff; color: #1a1a18;
       cursor: pointer; text-decoration: none; display: inline-flex;
       align-items: center; gap: 5px; }
.btn:hover { background: #f5f5f3; }
.btn-primary { background: #1a1a18; color: #fff; border-color: transparent; }
.btn-primary:hover { background: #333; }

.table-wrap { margin: 14px 24px 24px; border: 1px solid #e5e5e0;
              border-radius: 10px; overflow: hidden; background: #fff; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; padding: 9px 14px; background: #fafaf8; color: #888;
     font-weight: 500; font-size: 11px; text-transform: uppercase;
     letter-spacing: 0.04em; border-bottom: 1px solid #e5e5e0; }
td { padding: 10px 14px; border-bottom: 1px solid #f0f0ee; vertical-align: middle; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafaf8; }
.muted { color: #888; font-size: 12px; }
.empty { text-align: center; color: #888; padding: 32px; }

.avatar { display: inline-flex; align-items: center; justify-content: center;
          width: 26px; height: 26px; border-radius: 50%; background: #eeedfe;
          color: #3c3489; font-size: 10px; font-weight: 500; margin-right: 8px;
          vertical-align: middle; }

.badge { display: inline-flex; align-items: center; font-size: 11px;
         padding: 2px 8px; border-radius: 999px; font-weight: 500; }
.badge-pro { background: #eaf3de; color: #3b6d11; }
.badge-free { background: #f1efe8; color: #5f5e5a; border: 1px solid #e5e5e0; }
.badge-expired { background: #fcebeb; color: #a32d2d; }
.badge-stripe-paid, .badge-stripe-succeeded { background: #eaf3de; color: #3b6d11; }
.badge-stripe-pending { background: #faeeda; color: #854f0b; }
.badge-stripe-failed { background: #fcebeb; color: #a32d2d; }
.badge-stripe-none { background: #f1efe8; color: #888; border: 1px solid #e5e5e0; }

.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 5px; }
.dot-green { background: #639922; }
.dot-gray { background: #b4b2a9; }

.actions { display: flex; gap: 4px; }
.icon-btn { background: none; border: none; cursor: pointer; color: #888;
            font-size: 15px; padding: 4px; border-radius: 5px; }
.icon-btn:hover { color: #1a1a18; background: #f0f0ee; }
.icon-btn.danger:hover { color: #a32d2d; background: #fcebeb; }

.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,0.3);
                 display: flex; align-items: center; justify-content: center; z-index: 100; }
.modal { background: #fff; border-radius: 10px; padding: 24px;
         width: 360px; border: 1px solid #e5e5e0; }
.modal h2 { font-size: 15px; font-weight: 500; margin-bottom: 16px; }
.modal label { display: block; font-size: 12px; color: #888; margin: 10px 0 4px; }
.modal input, .modal select { width: 100%; padding: 7px 10px; border: 1px solid #e5e5e0;
    border-radius: 6px; font-size: 13px; }
.modal-actions { display: flex; gap: 8px; margin-top: 16px; }

.toast { position: fixed; bottom: 24px; right: 24px; padding: 10px 16px;
         border-radius: 8px; font-size: 13px; z-index: 200; }
.toast-success { background: #eaf3de; color: #3b6d11; border: 1px solid #c0dd97; }
.toast-error { background: #fcebeb; color: #a32d2d; border: 1px solid #f7c1c1; }

.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-card { background: #fff; border: 1px solid #e5e5e0; border-radius: 10px;
              padding: 32px; width: 320px; }
.login-card h1 { font-size: 16px; font-weight: 500; margin-bottom: 20px; }
.login-card label { display: block; font-size: 12px; color: #888; margin-bottom: 6px; }
.login-card input { width: 100%; padding: 8px 10px; border: 1px solid #e5e5e0;
    border-radius: 6px; font-size: 14px; margin-bottom: 14px; }
.login-card .btn { width: 100%; justify-content: center; padding: 9px; font-size: 13px; }
.error { color: #a32d2d; font-size: 13px; margin-bottom: 10px; }
