/* ============================================
   NCS Sign Portal — Stylesheet
   Design: matching netcorsoft.de
   ============================================ */

:root {
    --bg:           #091820;
    --gradient:     linear-gradient(160deg, #0C2B3E 0%, #091820 60%, #060F18 100%);
    --surface:      #0D2133;
    --surface-2:    #102840;
    --border:       rgba(255,255,255,0.08);
    --border-2:     rgba(255,255,255,0.14);

    --primary:      #1A9E7A;
    --primary-h:    #15856A;
    --primary-bg:   rgba(26, 158, 122, 0.12);
    --accent:       #00B4D8;
    --accent-bg:    rgba(0, 180, 216, 0.12);
    --link:         #5BB8D4;

    --success:      #1A9E7A;
    --success-bg:   rgba(26, 158, 122, 0.12);
    --warning:      #F59E0B;
    --warning-bg:   rgba(245, 158, 11, 0.12);
    --error:        #EF4444;
    --error-bg:     rgba(239, 68, 68, 0.12);
    --info:         #3B82F6;
    --info-bg:      rgba(59, 130, 246, 0.12);

    --text:         #FFFFFF;
    --text-sub:     #8BAFC4;
    --text-muted:   #4A6A7E;

    --radius:       12px;
    --radius-sm:    8px;
    --shadow:       0 4px 24px rgba(0,0,0,0.35);
    --shadow-lg:    0 8px 48px rgba(0,0,0,0.5);
}

/* ---------- RESET ---------- */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
body {
    background: var(--gradient);
    background-attachment: fixed;
    color: var(--text);
    font-family: 'Segoe UI', system-ui, -apple-system, Arial, sans-serif;
    font-size: 15px;
    line-height: 1.6;
    min-height: 100vh;
}
a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; color: var(--accent); }
ul { list-style: none; }
img { max-width: 100%; }

/* ---------- HEADER ---------- */
.header {
    background: rgba(7, 18, 28, 0.96);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    padding: 0 2rem;
    position: sticky;
    top: 0;
    z-index: 100;
}
.header-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8px 0;
}
.logo { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.logo:hover { text-decoration: none; }
.logo-icon { color: var(--accent); display: flex; }
.logo-icon svg { width: 38px; height: 38px; }
.logo-name { font-size: 17px; font-weight: 700; letter-spacing: 2.5px; color: var(--text); }
.logo-tag  { font-size: 20px; color: var(--text-sub); letter-spacing: 1px; margin-top: 1px; }
.nav { display: flex; align-items: center; gap: 1rem; }
.nav a { color: var(--text-sub); font-size: 14px; transition: color .15s; }
.nav a:hover { color: var(--text); text-decoration: none; }
.nav-user { font-size: 13px; color: var(--text-muted); }

/* ---------- DIVIDER LINE ---------- */
.h-divider {
    height: 2px;
    background: linear-gradient(90deg, var(--accent) 0%, rgba(0,180,216,.15) 70%, transparent 100%);
}

/* ---------- LAYOUT ---------- */
.container    { max-width: 1200px; margin: 0 auto; padding: 2rem; }
.container-sm { max-width: 500px;  margin: 0 auto; padding: 2rem 1rem; }

.page-header { margin-bottom: 2rem; }
.page-title  { font-size: 26px; font-weight: 700; }
.page-sub    { color: var(--text-sub); margin-top: 4px; font-size: 14px; }
.page-divider {
    height: 2px;
    width: 56px;
    background: linear-gradient(90deg, var(--accent), transparent);
    margin: 10px 0 20px;
}

.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.25rem; }
@media (max-width: 900px) {
    .grid-3 { grid-template-columns: 1fr 1fr; }
    .grid-4 { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 600px) {
    .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
    .container { padding: 1rem; }
}

/* ---------- CARD ---------- */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.5rem;
    box-shadow: var(--shadow);
}
.card-title {
    font-size: 16px;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--text);
    display: flex;
    align-items: center;
    gap: 8px;
}
.card-title svg { color: var(--accent); }

/* ---------- BUTTONS ---------- */
.btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    font-size: 14px; font-weight: 600;
    cursor: pointer; border: none;
    transition: all .18s ease;
    text-decoration: none; white-space: nowrap;
    line-height: 1.2;
}
.btn:hover { text-decoration: none; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-h); color: #fff; }
.btn-outline { background: transparent; color: var(--text); border: 1.5px solid rgba(255,255,255,.35); }
.btn-outline:hover { border-color: var(--text); color: var(--text); }
.btn-ghost { background: transparent; color: var(--text-sub); }
.btn-ghost:hover { color: var(--text); background: rgba(255,255,255,.05); }
.btn-danger { background: var(--error); color: #fff; }
.btn-danger:hover { background: #dc2626; color: #fff; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-xs { padding: 4px 10px; font-size: 12px; }
.btn-full { width: 100%; justify-content: center; }
.btn-icon { padding: 8px; border-radius: 6px; }

/* ---------- FORMS ---------- */
.form-group { margin-bottom: 1.25rem; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; }
@media (max-width: 480px) { .form-row { grid-template-columns: 1fr; } }
.form-label {
    display: block; font-size: 12px; font-weight: 600;
    color: var(--text-sub); margin-bottom: 6px;
    text-transform: uppercase; letter-spacing: .6px;
}
.form-control {
    width: 100%; background: rgba(0,0,0,.3);
    border: 1px solid var(--border-2);
    border-radius: var(--radius-sm);
    color: var(--text); padding: 10px 14px;
    font-size: 15px; outline: none;
    transition: border-color .18s;
    font-family: inherit;
}
.form-control:focus { border-color: var(--accent); }
.form-control::placeholder { color: var(--text-muted); }
.form-control:disabled { opacity: .5; }
select.form-control { cursor: pointer; }
select.form-control option { background: #0D2133; }
textarea.form-control { resize: vertical; min-height: 80px; }

/* ---------- BADGES ---------- */
.badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px;
    font-size: 12px; font-weight: 600;
}
.badge-success { background: var(--success-bg); color: var(--success); }
.badge-warning { background: var(--warning-bg); color: var(--warning); }
.badge-error   { background: var(--error-bg);   color: var(--error);   }
.badge-info    { background: var(--info-bg);     color: var(--info);    }
.badge-muted   { background: rgba(255,255,255,.05); color: var(--text-sub); }
.badge-accent  { background: var(--accent-bg);   color: var(--accent);  }

/* ---------- TABLE ---------- */
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
th {
    text-align: left; padding: 10px 14px;
    color: var(--text-sub); font-size: 11px;
    text-transform: uppercase; letter-spacing: .7px;
    border-bottom: 1px solid var(--border);
    background: rgba(0,0,0,.25); font-weight: 600;
}
td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--border);
    vertical-align: middle; font-size: 13px;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: rgba(255,255,255,.02); }
.td-actions { display: flex; gap: 6px; flex-wrap: nowrap; align-items: center; }

/* ---------- ACTIVITY ---------- */
.activity-list { display: flex; flex-direction: column; }
.activity-item { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--primary); flex-shrink: 0; margin-top: 5px; }
.activity-body { flex: 1; }
.activity-text { font-size: 13px; color: var(--text); line-height: 1.4; }
.activity-time { font-size: 11px; color: var(--text-sub); margin-top: 2px; }

/* ---------- ALERTS ---------- */
.alert {
    padding: 11px 15px; border-radius: var(--radius-sm);
    font-size: 14px; align-items: flex-start; gap: 8px;
    display: none;
}
.alert.show { display: flex; }
.alert-success { background: var(--success-bg); color: var(--success); border: 1px solid rgba(26,158,122,.3); }
.alert-error   { background: var(--error-bg);   color: var(--error);   border: 1px solid rgba(239,68,68,.3); }
.alert-warning { background: var(--warning-bg); color: var(--warning); border: 1px solid rgba(245,158,11,.3); }
.alert-info    { background: var(--info-bg);    color: var(--info);    border: 1px solid rgba(59,130,246,.3); }

/* ---------- MODAL ---------- */
.modal-bg {
    position: fixed; inset: 0;
    background: rgba(0,0,0,.72);
    backdrop-filter: blur(4px);
    z-index: 1000;
    display: none; align-items: center; justify-content: center;
    padding: 1rem;
}
.modal-bg.show { display: flex; }
.modal {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 2rem;
    max-width: 480px; width: 100%;
    box-shadow: var(--shadow-lg);
}
.modal-title { font-size: 18px; font-weight: 700; margin-bottom: 1.25rem; }
.modal-actions { display: flex; gap: .75rem; justify-content: flex-end; margin-top: 1.5rem; }

/* ---------- STAT CARD ---------- */
.stat {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 1.25rem 1.5rem;
    display: flex; align-items: center; gap: 1rem;
}
.stat-icon { font-size: 30px; min-width: 44px; text-align: center; }
.stat-val  { font-size: 28px; font-weight: 700; line-height: 1; }
.stat-lbl  { font-size: 13px; color: var(--text-sub); margin-top: 3px; }

/* ---------- PROGRESS ---------- */
.progress { height: 7px; background: rgba(255,255,255,.1); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.progress-fill { height: 100%; border-radius: 4px; transition: width .3s ease; background: var(--primary); }
.progress-fill.warn { background: var(--warning); }
.progress-fill.danger { background: var(--error); }

/* ---------- PLAN CARDS ---------- */
.plan-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 1.5rem; }
@media (max-width: 600px) { .plan-grid { grid-template-columns: 1fr; } }
.plan-card {
    border: 2px solid var(--border-2);
    border-radius: var(--radius); padding: 1.25rem;
    cursor: pointer; transition: all .18s;
    background: rgba(0,0,0,.2);
    user-select: none;
}
.plan-card:hover  { border-color: var(--accent);   background: var(--accent-bg); }
.plan-card.active { border-color: var(--primary);  background: var(--primary-bg); }
.plan-card input  { display: none; }
.plan-name  { font-size: 15px; font-weight: 700; margin-bottom: 4px; }
.plan-price { font-size: 24px; font-weight: 700; color: var(--accent); line-height: 1; }
.plan-price small { font-size: 13px; color: var(--text-sub); font-weight: 400; }
.plan-users { font-size: 12px; color: var(--text-sub); margin-top: 4px; }
.plan-badge { display: inline-block; font-size: 10px; padding: 2px 8px; border-radius: 20px; background: var(--primary-bg); color: var(--primary); font-weight: 700; margin-top: 6px; }

/* ---------- AUTH PAGES ---------- */
.auth-page {
    min-height: 100vh; display: flex; flex-direction: column;
    align-items: center; justify-content: center; padding: 2rem 1rem;
}
.auth-logo { text-align: center; margin-bottom: 2rem; }
.auth-logo-icon { color: var(--accent); display: flex; justify-content: center; margin-bottom: 8px; }
.auth-logo-icon svg { width: 44px; height: 44px; }
.auth-brand { font-size: 22px; font-weight: 700; letter-spacing: 3px; }
.auth-tagline { font-size: 20px; color: var(--text-sub); letter-spacing: 1px; }
.auth-line { height: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); width: 100px; margin: 12px auto; }
.auth-card {
    background: var(--surface);
    border: 1px solid var(--border-2);
    border-radius: var(--radius);
    padding: 2rem; width: 100%; max-width: 460px;
    box-shadow: var(--shadow-lg);
}
.auth-title { font-size: 21px; font-weight: 700; margin-bottom: 4px; }
.auth-sub   { color: var(--text-sub); font-size: 14px; margin-bottom: 1.5rem; }
.auth-footer { text-align: center; margin-top: 1.25rem; font-size: 14px; color: var(--text-sub); }
.auth-sep { height: 1px; background: var(--border); margin: 1.25rem 0; }

/* ---------- TABS ---------- */
.tabs { display: flex; gap: 2px; margin-bottom: 1.5rem; background: rgba(0,0,0,.3); border-radius: 10px; padding: 4px; }
.tab-btn {
    flex: 1; padding: 9px; text-align: center;
    border: none; background: none; color: var(--text-sub);
    border-radius: 8px; cursor: pointer; font-size: 14px; font-weight: 500;
    transition: all .15s;
}
.tab-btn.active { background: var(--surface-2); color: var(--text); }
.tab-btn:hover:not(.active) { color: var(--text); }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* ---------- SPINNER ---------- */
.spin {
    width: 16px; height: 16px;
    border: 2px solid rgba(255,255,255,.2);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin .65s linear infinite;
    display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- TOGGLE ---------- */
.toggle-wrap { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.toggle { position: relative; width: 40px; height: 22px; }
.toggle input { display: none; }
.toggle-slider {
    position: absolute; inset: 0; background: rgba(255,255,255,.15);
    border-radius: 11px; transition: .2s;
}
.toggle-slider::before {
    content: ''; position: absolute;
    width: 16px; height: 16px; background: #fff;
    border-radius: 50%; left: 3px; top: 3px; transition: .2s;
}
.toggle input:checked + .toggle-slider { background: var(--primary); }
.toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

/* ---------- EMPTY STATE ---------- */
.empty {
    text-align: center; padding: 3rem 1rem;
    color: var(--text-muted);
}
.empty-icon { font-size: 40px; margin-bottom: 1rem; opacity: .4; }
.empty-text { font-size: 14px; }

/* ---------- FOOTER ---------- */
.footer {
    text-align: center; padding: 2rem;
    color: var(--text-muted); font-size: 12px;
    border-top: 1px solid var(--border); margin-top: 4rem;
}

/* ---------- MISC ---------- */
.text-sub   { color: var(--text-sub); }
.text-muted { color: var(--text-muted); }
.text-accent { color: var(--accent); }
.text-primary { color: var(--primary); }
.text-sm    { font-size: 13px; }
.text-xs    { font-size: 12px; }
.fw-700     { font-weight: 700; }
.mt-1 { margin-top: .5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mb-1 { margin-bottom: .5rem; }
.mb-2 { margin-bottom: 1rem; }
.flex { display: flex; }
.flex-center { display: flex; align-items: center; gap: 8px; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.gap-2 { gap: 1rem; }
.d-none { display: none !important; }
