/* AuthCentral Final - Perfektes Layout mit SVG Icons */

/* ============================================
   FONT FACES
============================================ */
@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter/Inter-Regular.ttf');
    font-weight: 400;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter/Inter-Medium.ttf') format('truetype');
    font-weight: 500;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter/Inter-SemiBold.ttf') format('truetype');
    font-weight: 600;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter/Inter-Bold.ttf') format('truetype');
    font-weight: 700;
}

@font-face {
    font-family: 'Inter';
    src: url('../fonts/Inter/Inter-ExtraBold.ttf') format('truetype');
    font-weight: 800;
}

/* ============================================
   CSS VARIABLES
============================================ */
:root {
    /* Fonts */
    --font-2xl: 26px;
    --font-xl: 22px;
    --font-l: 18px;
    --font-m: 16px;
    --font-s: 14px;
    --font-xs: 12px;
    --font-family: "Inter", "Segoe UI", "Roboto", "Oxygen", "Ubuntu", "Cantarell", "Fira Sans", "Droid Sans", "Helvetica Neue", sans-serif;

    /* Main Theme Colour */
    --primary-1000: #740220;
    --primary-900: #A1022C;
    --primary-800: #C30235;
    --primary-700: #D40139;
    --primary-600: #E2013D;
    --primary-500: #E8104A;
    --primary-400: #ED2F62;
    --primary-300: #F6537E;
    --primary-200: #FF93AF;
    --primary-100: #FFBBCD;
    --primary-50: #FFDFE8;
    --primary-25: #FFF7F9;

    /* Grey Colours */
    --grey-1000: #1C1C1C;
    --grey-900: #212121;
    --grey-850: #282828;
    --grey-800: #353535;
    --grey-700: #535353;
    --grey-600: #656565;
    --grey-500: #848484;
    --grey-400: #B1B1B1;
    --grey-300: #D9D9D9;
    --grey-200: #EFEFEF;
    --grey-100: #F4F4F4;
    --grey-50: #F9F9F9;
    --grey-25: #FCFCFC;

    /* Success */
    --success-700: #027A48;
    --success-600: #039855;
    --success-500: #12B76A;
    --success-100: #D1FADF;
    --success-50: #ECFDF3;

    /* Warning */
    --warning-700: #B54708;
    --warning-600: #DC6803;
    --warning-500: #F79009;
    --warning-100: #FEF0C7;
    --warning-50: #FFFAEB;

    /* Error */
    --error-700: #B42318;
    --error-600: #D92D20;
    --error-500: #F04438;
    --error-100: #FEE4E2;
    --error-50: #FEF3F2;

    /* Main Colours */
    --white: #FFF;
    --black: #000;

    /* Text */
    --text-text-primary: var(--grey-900);
    --text-text-secondary: var(--grey-800);
    --text-text-tertiary: var(--grey-700);
    --text-text-quaternary: var(--grey-500);

    /* Surface */
    --surface-surface-bg: var(--white);
    --surface-surface-light: var(--grey-50);
    --surface-surface-primary: var(--grey-100);
    --surface-surface-secondary: var(--grey-200);
    --surface-surface-tertiary: var(--grey-300);
}

/* ============================================
   BASE STYLES
============================================ */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: var(--font-family);
}

html,
body {
    font-size: var(--font-s);
    color: var(--text-text-secondary);
    background-color: var(--grey-50);
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface-surface-light);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-surface-tertiary);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--grey-500);
}

/* ============================================
   GRID SYSTEM
============================================ */
.wrapper {
    width: 100%;
    padding-right: 12px;
    padding-left: 12px;
    margin-right: auto;
    margin-left: auto;
    max-width: 540px;
}

.wrapper-full {
    width: 100%;
    padding-right: 24px;
    padding-left: 24px;
}

@media (min-width: 769px) {
    .wrapper {
        max-width: 720px;
    }
}

@media (min-width: 992px) {
    .wrapper {
        max-width: 960px;
    }
}

@media (min-width: 1200px) {
    .wrapper {
        max-width: 1140px;
    }
}

@media (min-width: 1400px) {
    .wrapper {
        max-width: 1320px;
    }
}

/* ============================================
   UTILITY CLASSES
============================================ */
.none {
    display: none !important;
}

.block {
    display: block !important;
}

.flex {
    display: flex !important;
}

.justify-center {
    justify-content: center !important;
}

.justify-space-between {
    justify-content: space-between !important;
}

.align-center {
    align-items: center !important;
}

.w-full {
    width: 100%;
}

.min-h-screen {
    min-height: 100vh;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

/* Spacing */
.mb-5 {
    margin-bottom: 5px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.mb-30 {
    margin-bottom: 30px;
}

.mt-20 {
    margin-top: 20px;
}

.mx-auto {
    margin-left: auto;
    margin-right: auto;
}

/* Font Sizes */
.fs-xs {
    font-size: var(--font-xs);
}

.fs-s {
    font-size: var(--font-s);
}

.fs-m {
    font-size: var(--font-m);
}

.fs-l {
    font-size: var(--font-l);
}

.fs-xl {
    font-size: var(--font-xl);
}

.fs-2xl {
    font-size: var(--font-2xl);
}

/* Font Weights */
.fw-600 {
    font-weight: 600;
}

.fw-700 {
    font-weight: 700;
}

/* Text Colors */
.text-primary {
    color: var(--primary-600);
}

.text-tertiary {
    color: var(--text-text-tertiary);
}

.text-success {
    color: var(--success-700);
}

.text-warning {
    color: var(--warning-700);
}

.text-danger {
    color: var(--error-700);
}

/* Background Colors */
.bg-white {
    background: var(--white);
}

.bg-primary-light {
    background: var(--primary-50);
}

.bg-success {
    background: var(--success-50);
}

.bg-warning {
    background: var(--warning-50);
}

.bg-danger {
    background: var(--error-50);
}

/* Borders */
.border-b-1 {
    border-bottom: 1px solid;
}

.border-light {
    border-color: var(--surface-surface-tertiary);
}

/* ============================================
   COMPONENTS
============================================ */

/* Card */
.card {
    background-color: var(--white);
    border-radius: 8px;
    box-shadow: 0 1px 3px rgba(16, 24, 40, 0.1), 0 1px 2px rgba(16, 24, 40, 0.06);
    border: 1px solid var(--surface-surface-tertiary);
}

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

.card-header h2 {
    margin: 0;
}

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

.card-body {
    padding: 24px;
}

/* Buttons */
.btn {
    padding: 10px 16px;
    font-weight: 600;
    text-align: center;
    border: 1px solid transparent;
    border-radius: 8px;
    font-size: var(--font-s);
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    white-space: nowrap;
}

.btn-primary {
    background-color: var(--primary-600);
    color: var(--white);
    border: none;
}

.btn-primary:hover {
    background-color: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(226, 1, 61, 0.3);
}

.btn-primary:active {
    background-color: var(--primary-800);
    transform: translateY(0);
}

.btn-light {
    background-color: var(--white);
    color: var(--text-text-tertiary);
    border: 1px solid var(--surface-surface-tertiary);
}

.btn-light:hover {
    background-color: var(--surface-surface-light);
    border-color: var(--grey-400);
}

.btn-secondary {
    background-color: var(--white);
    border: 1px solid var(--primary-100);
    color: var(--primary-600);
}

.btn-secondary:hover {
    background-color: var(--primary-25);
    border-color: var(--primary-600);
}

.btn-sm {
    padding: 6px 12px;
    font-size: var(--font-xs);
}

.btn-icon {
    width: 18px;
    height: 18px;
    color: currentColor;
}

.btn svg {
    flex-shrink: 0;
}

/* Input Groups */
.input-group {
    margin-bottom: 16px;
}

.input-group label {
    display: block;
    color: var(--text-text-tertiary);
    font-weight: 600;
}

.input-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    border: 1px solid var(--surface-surface-tertiary);
    border-radius: 8px;
    background: var(--white);
    transition: all 0.3s ease;
}

.input-wrapper:hover {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 3px var(--primary-50);
}

.input-wrapper:focus-within {
    border-color: var(--primary-600);
    box-shadow: 0 0 0 4px var(--primary-50);
}

.input-icon {
    padding: 0 12px;
    color: var(--text-text-quaternary);
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.input-wrapper input,
.input-wrapper select {
    flex: 1;
    border: none;
    padding: 10px 14px;
    font-size: var(--font-s);
    color: var(--text-text-primary);
    background: transparent;
    border-radius: 8px;
    outline: none;
    font-family: var(--font-family);
}

.input-wrapper input::placeholder {
    color: var(--grey-500);
}

/* Select Styling */
select {
    appearance: none;
    -webkit-appearance: none;
    -moz-appearance: none;
    background-image: url('data:image/svg+xml;charset=UTF-8,<svg xmlns="http://www.w3.org/2000/svg" width="12" height="8" viewBox="0 0 12 8" fill="none"><path d="M1 1L6 6L11 1" stroke="%23848484" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"/></svg>');
    background-repeat: no-repeat;
    background-position: right 10px center;
    background-size: 12px;
    padding-right: 35px !important;
    cursor: pointer;
}

input[type="number"]::-webkit-inner-spin-button,
input[type="number"]::-webkit-outer-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

input[type="number"] {
    -moz-appearance: textfield;
}

/* ============================================
   LOGIN SCREEN
============================================ */
.login-container {
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
}

.login-card {
    padding: 50px 40px;
}

.logo-icon {
    display: inline-block;
    color: var(--primary-600);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Alert */
.alert {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    border-radius: 8px;
}

.alert-danger {
    background: var(--error-50);
    border: 1px solid var(--error-300);
    color: var(--error-700);
}

.alert-icon {
    flex-shrink: 0;
}

/* ============================================
   DASHBOARD
============================================ */
.dashboard-container {
    min-height: 100vh;
    background: var(--grey-50);
}

.dashboard-header {
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
}

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

.logo-lock {
    color: var(--primary-600);
}

.user-section {
    display: flex;
    align-items: center;
    gap: 16px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-600) 0%, var(--primary-800) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 700;
    font-size: 16px;
}

.user-info {
    display: none;
}

@media (min-width: 992px) {
    .user-info {
        display: block;
    }
}

/* Dashboard Grid */
.dashboard-main {
    padding: 30px 0;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 30px;
}

/* Stats Section - Full Width */
.stats-section {
    grid-column: 1 / -1;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
}

/* Content and Sidebar */
@media (min-width: 1200px) {
    .dashboard-grid {
        grid-template-columns: 1fr 380px;
    }

    .content-area {
        grid-column: 1;
    }

    .sidebar-area {
        grid-column: 2;
    }
}

/* Stat Cards */
.stat-card {
    padding: 24px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.stat-icon-wrapper {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.stat-icon {
    color: var(--primary-600);
}

.bg-success .stat-icon {
    color: var(--success-600);
}

.bg-warning .stat-icon {
    color: var(--warning-600);
}

.bg-danger .stat-icon {
    color: var(--error-600);
}

.stat-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--text-text-primary);
    line-height: 1;
    margin-bottom: 8px;
}

.stat-label {
    font-size: var(--font-xs);
    font-weight: 600;
    color: var(--text-text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Badges */
.stat-badge {
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.badge-primary {
    background: var(--primary-50);
    color: var(--primary-700);
}

.badge-success {
    background: var(--success-50);
    color: var(--success-700);
}

.badge-warning {
    background: var(--warning-50);
    color: var(--warning-700);
}

.badge-danger {
    background: var(--error-50);
    color: var(--error-700);
}

.badge-pro {
    background: #e0e7ff;
    color: #4338ca;
}

.badge-agency {
    background: #fef3c7;
    color: #d97706;
}

.badge-active {
    background: var(--success-50);
    color: var(--success-700);
}

.badge-expired {
    background: var(--error-50);
    color: var(--error-700);
}

/* Form Grid */
.form-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 16px;
}

@media (min-width: 768px) {
    .form-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* Table */
.table-wrapper {
    overflow-x: auto;
}

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

.table thead {
    background: var(--surface-surface-light);
}

.table th {
    padding: 16px 20px;
    text-align: left;
    font-weight: 600;
    color: var(--text-text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.table td {
    padding: 16px 20px;
    border-top: 1px solid var(--surface-surface-secondary);
    font-size: var(--font-s);
    color: var(--text-text-secondary);
}

.table tbody tr {
    transition: background-color 0.2s ease;
}

.table tbody tr:hover {
    background: var(--surface-surface-light);
}

th.sticky_actions,
td.sticky_actions {
    position: sticky;
    right: 0;
    background: inherit;
}

.table tbody tr:hover td.sticky_actions {
    background: var(--surface-surface-light);
}

/* License Key */
.license-key {
    font-family: 'Courier New', monospace;
    background: var(--primary-50);
    padding: 6px 10px;
    border-radius: 6px;
    font-size: 12px;
    color: var(--primary-700);
    font-weight: 600;
    display: inline-block;
}

/* Customer Email */
.customer-email {
    color: var(--text-text-tertiary);
    font-size: var(--font-xs);
}

/* Action Buttons */
.action-btn {
    padding: 6px 12px;
    border: none;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    margin-right: 6px;
    margin-bottom: 4px;
    display: inline-flex;
    align-items: center;
    gap: 4px;
    white-space: nowrap;
}

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

.action-btn.copy {
    background: var(--primary-600);
    color: white;
}

.action-btn.copy:hover {
    background: var(--primary-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(226, 1, 61, 0.2);
}

.action-btn.delete {
    background: var(--error-500);
    color: white;
}

.action-btn.delete:hover {
    background: var(--error-600);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(240, 68, 56, 0.2);
}

.action-btn.success {
    background: var(--success-600);
    color: white;
}

.action-btn.success:hover {
    background: var(--success-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(18, 183, 106, 0.2);
}

.action-btn.warning {
    background: var(--warning-600);
    color: white;
}

.action-btn.warning:hover {
    background: var(--warning-700);
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(220, 104, 3, 0.2);
}

.action-btn.info {
    background: #3b82f6;
    color: white;
}

.action-btn.info:hover {
    background: #2563eb;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(59, 130, 246, 0.2);
}

.action-btn.extend {
    background: #8b5cf6;
    color: white;
}

.action-btn.extend:hover {
    background: #7c3aed;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(139, 92, 246, 0.2);
}

/* Notes Preview */
.notes-preview {
    color: var(--text-text-tertiary);
    font-size: var(--font-xs);
    font-style: italic;
    cursor: help;
}

/* Quick Actions */
.quick-actions {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Activity Log */
.activity-log {
    max-height: 400px;
    overflow-y: auto;
}

.activity-item {
    padding: 16px 0;
    border-bottom: 1px solid var(--surface-surface-tertiary);
    display: flex;
    gap: 12px;
}

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

.activity-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--surface-surface-light);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
}

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

.activity-time {
    font-size: var(--font-xs);
    color: var(--text-text-tertiary);
}

.activity-empty {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-text-tertiary);
}

.activity-empty svg {
    color: var(--grey-400);
    margin: 0 auto;
}

/* Loading Spinner */
.loading {
    text-align: center;
    padding: 40px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--surface-surface-tertiary);
    border-top-color: var(--primary-600);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ============================================
   RESPONSIVE
============================================ */
@media (max-width: 768px) {
    .wrapper-full {
        padding-right: 16px;
        padding-left: 16px;
    }

    .login-card {
        padding: 30px 20px;
    }

    .dashboard-main {
        padding: 20px 0;
    }

    .card-body {
        padding: 20px;
    }

    .card-header {
        padding: 20px;
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-actions {
        width: 100%;
        justify-content: flex-end;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .stat-card {
        padding: 20px;
    }

    .stat-value {
        font-size: 28px;
    }

    .table th,
    .table td {
        padding: 10px 12px;
        font-size: var(--font-xs);
    }

    .license-key {
        font-size: 10px;
        padding: 4px 8px;
    }

    .action-btn {
        padding: 4px 8px;
        font-size: 10px;
    }

    .btn {
        padding: 8px 12px;
        font-size: var(--font-xs);
    }

    .header-content {
        flex-direction: column;
        gap: 16px;
    }

    .user-section {
        width: 100%;
        justify-content: space-between;
    }
}

/* Grid System for responsive layout */
@media (min-width: 769px) {
    .tablet\:grid-8 {
        flex: 0 0 auto;
        width: calc(100% * 8 / 12);
    }
}

@media (min-width: 992px) {
    .laptop\:grid-6 {
        flex: 0 0 auto;
        width: calc(100% * 6 / 12);
    }
}

@media (min-width: 1200px) {
    .desktop\:grid-5 {
        flex: 0 0 auto;
        width: calc(100% * 5 / 12);
    }
}

.strip {
    display: flex;
    flex-wrap: wrap;
    margin-right: -12px;
    margin-left: -12px;
}

.strip>* {
    padding-right: 12px;
    padding-left: 12px;
}

.grid-12 {
    flex: 0 0 auto;
    width: 100%;
}