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

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; color: #1a1a1a; background: #f5f5f5; }

a { color: #2563eb; text-decoration: none; }
a:hover { text-decoration: underline; }

/* Nav */
.topnav { display: flex; align-items: center; gap: 16px; padding: 0 24px; height: 52px; background: #1a1a1a; color: #fff; }
.topnav a { color: #fff; }
.topnav-logo { font-weight: 600; font-size: 15px; margin-right: auto; }

/* Container */
.container { max-width: 1100px; margin: 32px auto; padding: 0 24px; }
.container--narrow { max-width: 540px; }

/* Page header */
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 20px; }
.page-header h1 { font-size: 22px; }

h1 { font-size: 22px; margin-bottom: 20px; }
h2 { font-size: 17px; margin: 28px 0 12px; }
h3 { font-size: 14px; font-weight: 600; margin: 20px 0 10px; }
hr { border: none; border-top: 1px solid #e5e5e5; margin: 28px 0; }

/* Buttons */
.btn { display: inline-block; padding: 8px 16px; background: #2563eb; color: #fff; border: none; border-radius: 6px; cursor: pointer; font-size: 13px; font-weight: 500; }
.btn:hover { background: #1d4ed8; text-decoration: none; }
.btn-link { background: none; border: none; color: #ccc; cursor: pointer; font-size: 13px; padding: 0; }
.btn-link:hover { color: #fff; }
.btn-sm { padding: 4px 10px; font-size: 12px; background: #f3f4f6; border: 1px solid #d1d5db; border-radius: 4px; cursor: pointer; }
.btn-danger-sm { padding: 4px 10px; font-size: 12px; background: #fee2e2; border: 1px solid #fca5a5; color: #991b1b; border-radius: 4px; cursor: pointer; }

/* Table */
.data-table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 8px; overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.data-table th { text-align: left; padding: 10px 14px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .04em; color: #6b7280; background: #f9fafb; border-bottom: 1px solid #e5e7eb; }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #f3f4f6; vertical-align: middle; }
.data-table tr:last-child td { border-bottom: none; }
.data-table .actions { display: flex; gap: 6px; }
.empty { color: #9ca3af; padding: 20px 14px; }

/* Badges */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.badge-trial { background: #fef9c3; color: #854d0e; }
.badge-standard { background: #dbeafe; color: #1e40af; }
.badge-premium { background: #f3e8ff; color: #6b21a8; }
.badge-active { background: #dcfce7; color: #166534; }
.badge-inactive { background: #fee2e2; color: #991b1b; }

/* Forms */
.form { display: flex; flex-direction: column; gap: 14px; background: #fff; padding: 24px; border-radius: 8px; box-shadow: 0 1px 3px rgba(0,0,0,.08); }
.form--inline { background: none; padding: 0; box-shadow: none; }
.form label { display: flex; flex-direction: column; gap: 4px; font-weight: 500; font-size: 13px; }
.form input[type=text], .form input[type=password], .form select { padding: 7px 10px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; }
.form input:focus, .form select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 3px rgba(37,99,235,.12); }
.form .hint { font-size: 12px; color: #6b7280; font-weight: 400; }
.form fieldset { border: 1px solid #e5e7eb; border-radius: 6px; padding: 12px 14px; }
.form fieldset legend { font-size: 12px; font-weight: 600; padding: 0 6px; color: #6b7280; }
.form .checkbox { flex-direction: row; align-items: center; gap: 8px; font-weight: 400; }
.form-actions { display: flex; align-items: center; gap: 14px; margin-top: 4px; }
.error { color: #dc2626; background: #fee2e2; padding: 10px 14px; border-radius: 6px; font-size: 13px; }

/* Auth page */
.auth-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.auth-card { width: 100%; max-width: 360px; background: #fff; border-radius: 12px; padding: 36px; box-shadow: 0 4px 24px rgba(0,0,0,.1); }
.auth-logo { font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: #6b7280; margin-bottom: 8px; }
.auth-card h1 { font-size: 22px; margin-bottom: 20px; }
.auth-card .form { padding: 0; box-shadow: none; background: none; }
.auth-footer { margin-top: 20px; font-size: 13px; color: #6b7280; text-align: center; }

code { font-family: monospace; font-size: 12px; background: #f3f4f6; padding: 2px 5px; border-radius: 3px; }
