/* ============================================================
   SahihQR - Design System
   Fintech / Institutionnel / Réglementaire
   ============================================================ */

/* === CSS Variables === */
:root {
    --primary: #0F4C81;
    --primary-dark: #0A3A63;
    --primary-light: #1565A8;
    --accent: #00B4D8;
    --accent-light: #48CAE4;
    --accent-dark: #0096B7;
    --success: #10B981;
    --success-light: #D1FAE5;
    --warning: #F59E0B;
    --warning-light: #FEF3C7;
    --danger: #EF4444;
    --danger-light: #FEE2E2;
    --info: #3B82F6;
    --info-light: #DBEAFE;
    
    --bg-primary: #FFFFFF;
    --bg-secondary: #F8FAFC;
    --bg-dark: #0F172A;
    --bg-card: #FFFFFF;
    
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-muted: #94A3B8;
    --text-white: #FFFFFF;
    --text-on-primary: #FFFFFF;
    
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.05);
    --shadow: 0 4px 6px -1px rgba(0,0,0,0.1), 0 2px 4px -1px rgba(0,0,0,0.06);
    --shadow-md: 0 10px 15px -3px rgba(0,0,0,0.1), 0 4px 6px -2px rgba(0,0,0,0.05);
    --shadow-lg: 0 20px 25px -5px rgba(0,0,0,0.1), 0 10px 10px -5px rgba(0,0,0,0.04);
    --shadow-xl: 0 25px 50px -12px rgba(0,0,0,0.25);
    
    --radius-sm: 6px;
    --radius: 10px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;
    
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    
    --transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
}

/* === Reset & Base === */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-family);
    color: var(--text-primary);
    background: var(--bg-secondary);
    line-height: 1.7;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: var(--transition-fast);
}

a:hover {
    color: var(--accent);
}

img {
    max-width: 100%;
    height: auto;
}

/* === Container === */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container-sm {
    max-width: 680px;
    margin: 0 auto;
    padding: 0 24px;
}

/* === Typography === */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
}

h1 { font-size: 3rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.5rem; }
h4 { font-size: 1.25rem; }

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 2.5rem;
    margin-bottom: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.section-title p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    max-width: 600px;
    margin: 0 auto;
}

/* === Navbar === */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    transition: var(--transition);
    height: 72px;
}

.navbar.scrolled {
    box-shadow: var(--shadow-md);
}

.navbar-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
}

.logo-icon {
    width: 40px;
    height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.1rem;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.5px;
}

.logo-accent {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-links a {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: var(--transition-fast);
}

.nav-links a:hover {
    color: var(--primary);
    background: var(--bg-secondary);
}

.nav-cta {
    background: linear-gradient(135deg, var(--primary), var(--primary-light)) !important;
    color: white !important;
    padding: 10px 24px !important;
    border-radius: var(--radius-full) !important;
    font-weight: 600 !important;
}

.nav-cta:hover {
    box-shadow: 0 4px 15px rgba(15, 76, 129, 0.4) !important;
    transform: translateY(-1px);
}

.nav-cta-outline {
    border: 2px solid var(--border) !important;
    border-radius: var(--radius-full) !important;
    padding: 8px 20px !important;
}

.nav-cta-outline:hover {
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-primary);
    cursor: pointer;
}

/* User Menu */
.user-menu {
    position: relative;
}

.user-menu-btn {
    display: flex;
    align-items: center;
    gap: 8px;
    background: none;
    border: 2px solid var(--border);
    padding: 6px 16px 6px 6px;
    border-radius: var(--radius-full);
    cursor: pointer;
    font-family: var(--font-family);
    font-weight: 500;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.user-menu-btn:hover {
    border-color: var(--primary);
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.75rem;
    font-weight: 700;
}

.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 240px;
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: var(--transition-fast);
}

.user-dropdown.active {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-header {
    padding: 16px;
    border-bottom: 1px solid var(--border);
}

.dropdown-header strong {
    display: block;
    font-size: 0.9rem;
}

.dropdown-header small {
    color: var(--text-muted);
    font-size: 0.8rem;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 16px;
    color: var(--text-secondary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
}

.dropdown-item:hover {
    background: var(--bg-secondary);
}

.text-danger {
    color: var(--danger) !important;
}

/* === Buttons === */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 12px 28px;
    border: none;
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    line-height: 1.5;
    position: relative;
    overflow: hidden;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    box-shadow: 0 4px 15px rgba(15, 76, 129, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 6px 20px rgba(15, 76, 129, 0.5);
    color: white;
}

.btn-accent {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    color: white;
    box-shadow: 0 4px 15px rgba(0, 180, 216, 0.3);
}

.btn-accent:hover {
    box-shadow: 0 6px 20px rgba(0, 180, 216, 0.5);
    color: white;
}

.btn-outline {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}

.btn-outline:hover {
    background: var(--primary);
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, var(--danger), #DC2626);
    color: white;
}

.btn-sm {
    padding: 8px 18px;
    font-size: 0.85rem;
}

.btn-lg {
    padding: 16px 36px;
    font-size: 1.05rem;
}

.btn-full {
    width: 100%;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* === Cards === */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: var(--transition);
}

.card:hover {
    box-shadow: var(--shadow-md);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: 1.25rem;
}

/* === Forms === */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 600;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    font-family: var(--font-family);
    font-size: 0.95rem;
    color: var(--text-primary);
    background: white;
    transition: var(--transition-fast);
    outline: none;
}

.form-control:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(0, 180, 216, 0.1);
}

.form-control::placeholder {
    color: var(--text-muted);
}

.form-control.error {
    border-color: var(--danger);
}

.form-hint {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 4px;
}

.form-error {
    font-size: 0.8rem;
    color: var(--danger);
    margin-top: 4px;
}

select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 16px center;
    padding-right: 40px;
}

textarea.form-control {
    min-height: 100px;
    resize: vertical;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* === File Upload === */
.file-upload {
    border: 2px dashed var(--border);
    border-radius: var(--radius);
    padding: 32px;
    text-align: center;
    cursor: pointer;
    transition: var(--transition);
    background: var(--bg-secondary);
}

.file-upload:hover {
    border-color: var(--accent);
    background: rgba(0, 180, 216, 0.05);
}

.file-upload.dragover {
    border-color: var(--accent);
    background: rgba(0, 180, 216, 0.1);
}

.file-upload i {
    font-size: 2.5rem;
    color: var(--accent);
    margin-bottom: 12px;
}

.file-upload p {
    color: var(--text-secondary);
    font-size: 0.9rem;
}

.file-upload input[type="file"] {
    display: none;
}

.file-name {
    margin-top: 8px;
    font-weight: 600;
    color: var(--success);
    font-size: 0.85rem;
}

/* === Tables === */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius);
    border: 1px solid var(--border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.table thead {
    background: var(--bg-secondary);
}

.table th {
    padding: 14px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    border-bottom: 2px solid var(--border);
    white-space: nowrap;
}

.table td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

.table tbody tr:hover {
    background: var(--bg-secondary);
}

.table tbody tr:last-child td {
    border-bottom: none;
}

/* === Badges === */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.badge-success {
    background: var(--success-light);
    color: var(--success);
}

.badge-warning {
    background: var(--warning-light);
    color: var(--warning);
}

.badge-danger {
    background: var(--danger-light);
    color: var(--danger);
}

.badge-info {
    background: var(--info-light);
    color: var(--info);
}

.badge-primary {
    background: rgba(15, 76, 129, 0.1);
    color: var(--primary);
}

/* === Flash Messages === */
.flash-message {
    padding: 14px 0;
    font-weight: 500;
    font-size: 0.9rem;
    position: fixed;
    top: 72px;
    left: 0;
    right: 0;
    z-index: 999;
    animation: slideDown 0.3s ease;
}

.flash-message .container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.flash-success {
    background: var(--success-light);
    color: #065F46;
    border-bottom: 2px solid var(--success);
}

.flash-error {
    background: var(--danger-light);
    color: #991B1B;
    border-bottom: 2px solid var(--danger);
}

.flash-info {
    background: var(--info-light);
    color: #1E40AF;
    border-bottom: 2px solid var(--info);
}

.flash-close {
    margin-left: auto;
    background: none;
    border: none;
    cursor: pointer;
    font-size: 1rem;
    opacity: 0.6;
    color: inherit;
}

@keyframes slideDown {
    from { transform: translateY(-100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

/* === Hero Section === */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F4C81 100%);
    overflow: hidden;
    padding-top: 72px;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 180, 216, 0.15) 0%, transparent 50%),
                radial-gradient(circle at 70% 80%, rgba(15, 76, 129, 0.2) 0%, transparent 50%);
    pointer-events: none;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-content {
    color: white;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 8px 20px;
    background: rgba(0, 180, 216, 0.15);
    border: 1px solid rgba(0, 180, 216, 0.3);
    border-radius: var(--radius-full);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--accent-light);
    margin-bottom: 24px;
}

.hero h1 {
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    color: white;
    margin-bottom: 24px;
    letter-spacing: -1px;
}

.hero h1 .highlight {
    background: linear-gradient(135deg, var(--accent), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero p {
    font-size: 1.2rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.8;
    margin-bottom: 36px;
    max-width: 520px;
}

.hero-buttons {
    display: flex;
    gap: 16px;
    margin-bottom: 48px;
}

.hero-stats {
    display: flex;
    gap: 48px;
}

.hero-stat {
    text-align: center;
}

.hero-stat-value {
    font-size: 2rem;
    font-weight: 800;
    color: var(--accent);
}

.hero-stat-label {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.5);
    margin-top: 4px;
}

.hero-visual {
    position: relative;
}

.hero-card {
    background: rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: var(--radius-xl);
    padding: 40px;
    position: relative;
}

.hero-card-header {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 32px;
}

.hero-card-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
}

.hero-card-title {
    color: white;
    font-size: 1.2rem;
}

.hero-card-subtitle {
    color: rgba(255,255,255,0.5);
    font-size: 0.85rem;
}

.hero-hash {
    background: rgba(0, 0, 0, 0.3);
    border-radius: var(--radius);
    padding: 16px 20px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    color: var(--accent);
    word-break: break-all;
    margin-bottom: 24px;
    border: 1px solid rgba(0, 180, 216, 0.2);
}

.hero-ref {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: var(--radius);
}

.hero-ref-label {
    font-size: 0.8rem;
    color: rgba(255,255,255,0.5);
}

.hero-ref-value {
    font-weight: 700;
    color: var(--success);
    font-size: 1.1rem;
    letter-spacing: 1px;
}

.floating-badge {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius);
    padding: 12px 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 0.85rem;
    color: white;
    font-weight: 500;
    animation: float 6s ease-in-out infinite;
}

.floating-badge.top-right {
    top: -20px;
    right: -20px;
    animation-delay: 0s;
}

.floating-badge.bottom-left {
    bottom: -20px;
    left: -20px;
    animation-delay: 3s;
}

.floating-badge i {
    color: var(--accent);
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* === Features Section === */
.section {
    padding: 100px 0;
}

.section-alt {
    background: white;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 32px;
}

.feature-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-4px);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: linear-gradient(135deg, rgba(15, 76, 129, 0.1), rgba(0, 180, 216, 0.1));
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    font-size: 1.15rem;
    margin-bottom: 12px;
}

.feature-card p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    line-height: 1.7;
}

/* === Security Section === */
.security-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 32px;
}

.security-card {
    background: var(--bg-dark);
    border-radius: var(--radius-lg);
    padding: 36px;
    color: white;
    display: flex;
    gap: 20px;
    transition: var(--transition);
}

.security-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-xl);
}

.security-icon {
    width: 50px;
    height: 50px;
    min-width: 50px;
    background: linear-gradient(135deg, var(--accent), var(--accent-dark));
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.security-card h3 {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.security-card p {
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
}

/* === How It Works === */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 32px;
    position: relative;
}

.steps-grid::before {
    content: '';
    position: absolute;
    top: 45px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    z-index: 0;
}

.step-card {
    text-align: center;
    position: relative;
    z-index: 1;
}

.step-number {
    width: 90px;
    height: 90px;
    margin: 0 auto 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 2rem;
    font-weight: 800;
    box-shadow: 0 8px 30px rgba(0, 180, 216, 0.3);
}

.step-card h3 {
    font-size: 1.1rem;
    margin-bottom: 8px;
}

.step-card p {
    color: var(--text-secondary);
    font-size: 0.85rem;
}

/* === CTA Section === */
.cta-section {
    background: linear-gradient(135deg, var(--primary-dark), var(--primary));
    padding: 80px 0;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 50% 50%, rgba(0, 180, 216, 0.15), transparent 70%);
}

.cta-section h2 {
    color: white;
    font-size: 2.5rem;
    margin-bottom: 16px;
    position: relative;
}

.cta-section p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.15rem;
    margin-bottom: 36px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
    position: relative;
}

.cta-features {
    display: flex;
    justify-content: center;
    gap: 40px;
    margin-bottom: 40px;
    position: relative;
}

.cta-feature {
    display: flex;
    align-items: center;
    gap: 10px;
    color: rgba(255, 255, 255, 0.8);
    font-size: 0.95rem;
}

.cta-feature i {
    color: var(--accent);
    font-size: 1.1rem;
}

/* === Auth Pages === */
.auth-page {
    display: flex;
    min-height: 100vh;
    background: var(--bg-secondary);
}

.auth-sidebar {
    width: 45%;
    background: linear-gradient(135deg, #0F172A 0%, #1E293B 50%, #0F4C81 100%);
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    position: relative;
    overflow: hidden;
}

.auth-sidebar::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: radial-gradient(circle at 30% 50%, rgba(0, 180, 216, 0.15) 0%, transparent 50%);
}

.auth-sidebar-content {
    position: relative;
    z-index: 1;
    color: white;
}

.auth-sidebar h2 {
    font-size: 2.5rem;
    color: white;
    margin-bottom: 20px;
    line-height: 1.2;
}

.auth-sidebar p {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 40px;
}

.auth-feature-list {
    list-style: none;
}

.auth-feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 16px;
    font-size: 0.95rem;
}

.auth-feature-list i {
    color: var(--accent);
    font-size: 1.1rem;
    width: 24px;
}

.auth-main {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px;
}

.auth-form-container {
    width: 100%;
    max-width: 500px;
}

.auth-form-header {
    margin-bottom: 36px;
}

.auth-form-header .logo {
    margin-bottom: 32px;
}

.auth-form-header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.auth-form-header p {
    color: var(--text-secondary);
}

.auth-links {
    text-align: center;
    margin-top: 24px;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

.auth-links a {
    color: var(--primary);
    font-weight: 600;
}

/* === Dashboard === */
.dashboard {
    padding-top: 100px;
    min-height: 100vh;
}

.dashboard-header {
    margin-bottom: 36px;
}

.dashboard-header h1 {
    font-size: 1.75rem;
    margin-bottom: 8px;
}

.dashboard-header p {
    color: var(--text-secondary);
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 24px;
    margin-bottom: 36px;
}

.stat-card {
    background: white;
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.2rem;
}

.stat-icon.blue {
    background: rgba(15, 76, 129, 0.1);
    color: var(--primary);
}

.stat-icon.green {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.stat-icon.orange {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.stat-icon.cyan {
    background: rgba(0, 180, 216, 0.1);
    color: var(--accent);
}

.stat-info h3 {
    font-size: 1.75rem;
    font-weight: 800;
    line-height: 1;
    margin-bottom: 4px;
}

.stat-info p {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* === Verification Page === */
.verify-page {
    padding-top: 100px;
    min-height: 100vh;
}

.verify-container {
    max-width: 700px;
    margin: 0 auto;
    padding: 0 24px;
}

.verify-header {
    text-align: center;
    margin-bottom: 48px;
}

.verify-header h1 {
    font-size: 2rem;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.verify-tabs {
    display: flex;
    border-bottom: 2px solid var(--border);
    margin-bottom: 32px;
}

.verify-tab {
    flex: 1;
    padding: 16px;
    text-align: center;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: pointer;
    border-bottom: 3px solid transparent;
    margin-bottom: -2px;
    transition: var(--transition-fast);
    background: none;
    border-top: none;
    border-left: none;
    border-right: none;
    font-family: var(--font-family);
    font-size: 0.95rem;
}

.verify-tab.active {
    color: var(--primary);
    border-bottom-color: var(--primary);
}

.verify-tab:hover {
    color: var(--primary);
}

.verify-tab-content {
    display: none;
}

.verify-tab-content.active {
    display: block;
}

.verify-result {
    margin-top: 32px;
}

.result-card {
    border-radius: var(--radius-lg);
    padding: 36px;
    text-align: center;
}

.result-card.valid {
    background: var(--success-light);
    border: 2px solid var(--success);
}

.result-card.invalid {
    background: var(--danger-light);
    border: 2px solid var(--danger);
}

.result-icon {
    font-size: 3rem;
    margin-bottom: 16px;
}

.result-card.valid .result-icon {
    color: var(--success);
}

.result-card.invalid .result-icon {
    color: var(--danger);
}

.result-details {
    margin-top: 24px;
    text-align: left;
    background: white;
    border-radius: var(--radius);
    padding: 24px;
}

.result-row {
    display: flex;
    justify-content: space-between;
    padding: 10px 0;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
}

.result-row:last-child {
    border-bottom: none;
}

.result-row-label {
    color: var(--text-secondary);
    font-weight: 500;
}

.result-row-value {
    font-weight: 600;
    color: var(--text-primary);
}

/* === Pagination === */
.pagination {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 32px;
}

.pagination a, .pagination span {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 0.85rem;
    border: 1px solid var(--border);
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.pagination a:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

.pagination .active {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
}

/* === Footer === */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 0;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr repeat(3, 1fr);
    gap: 48px;
    margin-bottom: 48px;
}

.footer-brand .logo {
    margin-bottom: 16px;
}

.footer-brand .logo-text {
    color: white;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.7;
    max-width: 320px;
}

.footer-links h4 {
    color: white;
    font-size: 1rem;
    margin-bottom: 20px;
}

.footer-links a, .footer-links p {
    display: flex;
    align-items: center;
    gap: 8px;
    color: rgba(255, 255, 255, 0.6);
    font-size: 0.9rem;
    margin-bottom: 12px;
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent);
}

.footer-links i {
    width: 16px;
    color: var(--accent);
    font-size: 0.85rem;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding: 24px 0;
    text-align: center;
    font-size: 0.85rem;
}

.footer-legal {
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.4);
    margin-top: 8px;
}

/* === Utilities === */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.mt-3 { margin-top: 24px; }
.mt-4 { margin-top: 32px; }
.mb-1 { margin-bottom: 8px; }
.mb-2 { margin-bottom: 16px; }
.mb-3 { margin-bottom: 24px; }
.mb-4 { margin-bottom: 32px; }
.flex { display: flex; }
.flex-between { display: flex; justify-content: space-between; align-items: center; }
.gap-2 { gap: 16px; }
.gap-3 { gap: 24px; }

/* === QR Code Box === */
.qr-display {
    text-align: center;
    padding: 24px;
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    max-width: 280px;
    margin: 16px auto;
}

.qr-display img {
    max-width: 200px;
}

/* === Empty State === */
.empty-state {
    text-align: center;
    padding: 60px 24px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 3rem;
    margin-bottom: 16px;
    opacity: 0.5;
}

.empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 8px;
}

/* === Hash Display === */
.hash-display {
    background: var(--bg-secondary);
    padding: 3px 8px;
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    cursor: help;
}

/* === Verify Valid/Invalid === */
.verify-valid {
    border-top: 4px solid var(--success);
}

.verify-invalid {
    border-top: 4px solid var(--danger);
}

/* === Legal Pages === */
.legal-page {
    padding-bottom: 80px;
}

.legal-page h1 {
    font-size: 2rem;
    margin-bottom: 4px;
}

.legal-updated {
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-bottom: 40px;
}

.legal-content section {
    margin-bottom: 36px;
}

.legal-content h2 {
    font-size: 1.2rem;
    color: var(--primary);
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border);
}

.legal-content h3 {
    font-size: 1rem;
    color: var(--text-primary);
    margin-top: 16px;
    margin-bottom: 8px;
}

.legal-content p {
    line-height: 1.8;
    margin-bottom: 12px;
    color: var(--text-secondary);
}

.legal-content ul,
.legal-content ol {
    padding-left: 24px;
    margin-bottom: 12px;
}

.legal-content li {
    line-height: 1.8;
    margin-bottom: 4px;
    color: var(--text-secondary);
}

.legal-table {
    width: 100%;
    border-collapse: collapse;
    margin: 16px 0;
    font-size: 0.9rem;
}

.legal-table th,
.legal-table td {
    padding: 12px 16px;
    text-align: left;
    border: 1px solid var(--border);
}

.legal-table th {
    background: var(--primary);
    color: white;
    font-weight: 600;
}

.legal-table td {
    color: var(--text-secondary);
}

.legal-table tr:nth-child(even) td {
    background: var(--bg-secondary);
}

/* === QR Code Customizer === */
.qr-customizer-card {
    padding: 32px;
}

.qr-customizer-grid {
    display: grid;
    grid-template-columns: 1fr 260px;
    gap: 28px;
    align-items: start;
}

.qr-options {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.qr-option-group {
    padding: 18px 20px;
    background: var(--bg-secondary);
    border-radius: var(--radius);
    border: 1px solid var(--border-light);
}

.qr-option-group .form-label {
    margin-bottom: 14px;
    font-size: 0.88rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.qr-option-group .form-label i {
    color: var(--accent);
    width: 18px;
    text-align: center;
}

.qr-color-row {
    display: flex;
    gap: 20px;
    margin-bottom: 12px;
}

.qr-color-pick {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.qr-color-pick label {
    font-size: 0.8rem;
    color: var(--text-secondary);
    white-space: nowrap;
}

.qr-color-pick input[type="color"] {
    width: 44px;
    height: 36px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 2px;
    background: white;
}

.qr-color-pick input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.qr-color-pick input[type="color"]::-webkit-color-swatch {
    border: none;
    border-radius: 3px;
}

.qr-color-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.qr-preset {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: 2px solid var(--border);
    cursor: pointer;
    overflow: hidden;
    padding: 3px;
    background: white;
    transition: var(--transition-fast);
}

.qr-preset:hover {
    border-color: var(--primary);
    transform: scale(1.15);
}

.qr-preset span {
    display: block;
    width: 100%;
    height: 100%;
    border-radius: 50%;
}

.qr-size-control {
    display: flex;
    align-items: center;
    gap: 12px;
}

.qr-slider {
    flex: 1;
    -webkit-appearance: none;
    appearance: none;
    height: 6px;
    background: var(--border);
    border-radius: 3px;
    outline: none;
}

.qr-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 2px 6px rgba(15, 76, 129, 0.3);
    transition: var(--transition-fast);
}

.qr-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.qr-slider::-moz-range-thumb {
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    border: none;
    box-shadow: 0 2px 6px rgba(15, 76, 129, 0.3);
}

.qr-size-value {
    font-size: 0.85rem;
    font-weight: 600;
    color: var(--primary);
    min-width: 50px;
    text-align: right;
}

.qr-position-grid {
    display: grid;
    grid-template-columns: repeat(3, 48px);
    grid-template-rows: repeat(3, 48px);
    gap: 6px;
    justify-content: center;
}

.qr-pos {
    width: 48px;
    height: 48px;
    border: 2px solid var(--border);
    border-radius: var(--radius-sm);
    background: white;
    cursor: pointer;
    font-size: 1.15rem;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition-fast);
    color: var(--text-secondary);
}

.qr-pos:hover {
    border-color: var(--accent);
    background: var(--bg-secondary);
}

.qr-pos.active {
    border-color: var(--primary);
    background: var(--primary);
    color: white;
    font-weight: 700;
    box-shadow: 0 2px 8px rgba(15, 76, 129, 0.3);
}

.qr-page-control .form-control {
    max-width: 220px;
}

/* QR Preview */
.qr-preview-col {
    position: sticky;
    top: 100px;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.qr-preview-box {
    background: white;
    border: 2px solid var(--border);
    border-radius: var(--radius);
    padding: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 200px;
    width: 100%;
    box-sizing: border-box;
}

.qr-preview-box canvas {
    max-width: 100%;
    height: auto;
    display: block;
}

/* QR Actions */
.qr-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    align-items: center;
    margin-top: 28px;
    padding-top: 24px;
    border-top: 1px solid var(--border-light);
}

/* QR Notices */
.qr-notice {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.8rem;
    color: var(--text-secondary);
    background: #E3F2FD;
    border: 1px solid #BBDEFB;
}

.qr-notice i {
    color: var(--accent);
    margin-top: 2px;
    flex-shrink: 0;
}

.qr-notice-warn {
    background: #FFF3E0;
    border-color: #FFE0B2;
}

.qr-notice-warn i {
    color: #F57C00;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .hero-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
    
    .hero h1 {
        font-size: 2.5rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .steps-grid::before {
        display: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
    
    .auth-sidebar {
        display: none;
    }
    
    .qr-customizer-grid {
        grid-template-columns: 1fr;
    }
    
    .qr-preview-col {
        position: static;
        order: -1;
    }
}

@media (max-width: 768px) {
    h1 { font-size: 2rem; }
    h2 { font-size: 1.75rem; }
    
    .section { padding: 60px 0; }
    
    .section-title h2 { font-size: 1.75rem; }
    
    .nav-links {
        display: none;
        position: fixed;
        top: 72px;
        left: 0;
        right: 0;
        background: white;
        flex-direction: column;
        padding: 24px;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow-lg);
        gap: 4px;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    .nav-links a {
        padding: 12px 16px;
        width: 100%;
    }
    
    .mobile-toggle {
        display: block;
    }
    
    .hero {
        min-height: auto;
        padding: 120px 0 60px;
    }
    
    .hero h1 {
        font-size: 2rem;
    }
    
    .hero-buttons {
        flex-direction: column;
    }
    
    .hero-stats {
        gap: 24px;
    }
    
    .hero-visual {
        display: none;
    }
    
    .features-grid,
    .security-grid {
        grid-template-columns: 1fr;
    }
    
    .steps-grid {
        grid-template-columns: 1fr;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 32px;
    }
    
    .cta-features {
        flex-direction: column;
        align-items: center;
        gap: 16px;
    }
    
    .auth-page {
        flex-direction: column;
    }
    
    .auth-sidebar {
        display: none;
    }
    
    .table-wrapper {
        font-size: 0.8rem;
    }
    
    .qr-customizer-grid {
        grid-template-columns: 1fr;
    }
    
    .qr-customizer-card {
        padding: 20px;
    }
    
    .qr-color-row {
        flex-direction: column;
        gap: 10px;
    }
    
    .qr-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .qr-actions .btn {
        justify-content: center;
    }
}

/* ============================================================
   Admin Signatures Filters
   ============================================================ */
.sig-filters-form {
    display: flex;
    flex-direction: column;
    gap: 12px;
}
.sig-filters-row {
    display: flex;
    gap: 12px;
    align-items: flex-end;
    flex-wrap: wrap;
}
.sig-filter-search {
    flex: 1;
    min-width: 200px;
    margin-bottom: 0;
}
.sig-filter-signataire {
    flex: 0 1 260px;
    min-width: 180px;
    margin-bottom: 0;
}
.sig-filter-date {
    flex: 0 1 180px;
    min-width: 140px;
    margin-bottom: 0;
}
.sig-filter-actions {
    display: flex;
    gap: 8px;
    align-items: flex-end;
    padding-bottom: 1px;
}
.sig-filter-actions .btn {
    height: 42px;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .sig-filters-row {
        flex-direction: column;
        align-items: stretch;
    }
    .sig-filter-signataire,
    .sig-filter-date {
        flex: 1;
    }
    .sig-filter-actions {
        justify-content: stretch;
    }
    .sig-filter-actions .btn {
        flex: 1;
        justify-content: center;
    }
}

/* ============================================================
   Admin Signatures Table
   ============================================================ */
.admin-sig-table .sig-ref {
    color: var(--primary);
    font-weight: 700;
    font-size: 0.85rem;
    background: rgba(15,76,129,0.06);
    padding: 3px 8px;
    border-radius: 4px;
    white-space: nowrap;
}

.admin-sig-table .sig-ref-click {
    cursor: pointer;
    transition: background 0.15s, box-shadow 0.15s;
    border: 1px solid transparent;
}

.admin-sig-table .sig-ref-click:hover {
    background: rgba(15,76,129,0.14);
    border-color: var(--primary);
    box-shadow: 0 1px 6px rgba(15,76,129,0.18);
}

/* Signature Detail Modal */
.sig-detail-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.55);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.sig-detail-modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg, 16px);
    width: 92%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: sigModalIn 0.22s ease;
}

@keyframes sigModalIn {
    from { opacity: 0; transform: translateY(24px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}

.sig-detail-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.sig-detail-modal-header h3 {
    margin: 0;
    font-size: 1.1rem;
    color: var(--primary);
}

.sig-detail-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}

.sig-detail-close:hover {
    background: var(--bg-secondary);
    color: var(--danger);
}

.admin-sig-table .sig-company {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-sig-table .sig-company small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.admin-sig-table .sig-signer {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.admin-sig-table .sig-signer small {
    color: var(--text-muted);
    font-size: 0.75rem;
}

.admin-sig-table .sig-date {
    display: flex;
    flex-direction: column;
    gap: 2px;
    white-space: nowrap;
}

.admin-sig-table .sig-date small {
    color: var(--text-muted);
    font-size: 0.72rem;
}

.admin-sig-table .sig-hash {
    font-size: 0.72rem;
    color: var(--text-secondary);
    background: var(--bg-secondary);
    padding: 2px 6px;
    border-radius: 3px;
    cursor: help;
}

.admin-sig-table .sig-desc {
    font-size: 0.82rem;
    color: var(--text-secondary);
    cursor: help;
}

.sort-link {
    text-decoration: none;
    color: inherit;
    display: inline-flex;
    align-items: center;
    white-space: nowrap;
}

.sort-link:hover {
    color: var(--accent);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 16px;
    padding: 20px;
    border-top: 1px solid var(--border);
}

.pagination-info {
    font-size: 0.85rem;
    color: var(--text-secondary);
}

/* ============================================================
   PDF Manual Position Modal
   ============================================================ */
.pdf-pos-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0,0,0,0.65);
    display: flex;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.pdf-pos-modal-content {
    background: var(--bg-primary);
    border-radius: var(--radius-lg, 16px);
    width: 95%;
    max-width: 800px;
    max-height: 92vh;
    overflow-y: auto;
    padding: 28px;
    box-shadow: 0 24px 64px rgba(0,0,0,0.3);
    animation: pdfModalIn 0.25s ease;
}

@keyframes pdfModalIn {
    from { opacity: 0; transform: translateY(30px) scale(0.97); }
    to { opacity: 1; transform: translateY(0) scale(1); }
}

.pdf-pos-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.pdf-pos-modal-header h3 {
    margin: 0;
    font-size: 1.15rem;
    color: var(--primary);
}

.pdf-pos-close {
    background: none;
    border: none;
    font-size: 1.6rem;
    cursor: pointer;
    color: var(--text-muted);
    padding: 4px 10px;
    border-radius: 6px;
    transition: background 0.15s;
}

.pdf-pos-close:hover {
    background: var(--bg-secondary);
    color: var(--danger);
}

.pdf-pos-hint {
    font-size: 0.84rem;
    color: var(--text-secondary);
    margin-bottom: 14px;
    background: rgba(0,180,216,0.06);
    padding: 10px 14px;
    border-radius: var(--radius);
    border-left: 3px solid var(--accent);
}

.pdf-pos-toolbar {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 14px;
    margin-bottom: 12px;
}

.pdf-pos-viewport {
    position: relative;
    display: flex;
    justify-content: center;
    background: #e8e8e8;
    border-radius: var(--radius);
    overflow: hidden;
    min-height: 200px;
    border: 1px solid var(--border);
}

.pdf-pos-viewport canvas {
    display: block;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
}

.pdf-pos-stamp {
    position: absolute;
    cursor: grab;
    border: 2px solid var(--primary);
    border-radius: 4px;
    background: rgba(255,255,255,0.95);
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(15,76,129,0.35);
    user-select: none;
    touch-action: none;
    transition: box-shadow 0.15s;
    z-index: 10;
}

.pdf-pos-stamp:hover {
    box-shadow: 0 4px 18px rgba(15,76,129,0.5);
}

.pdf-pos-stamp.dragging {
    cursor: grabbing;
    box-shadow: 0 6px 24px rgba(15,76,129,0.6);
    opacity: 0.9;
}

.pdf-pos-stamp-header {
    background: var(--primary);
    color: #fff;
    font-size: 7px;
    font-weight: 700;
    text-align: center;
    padding: 3px 6px;
    letter-spacing: 0.8px;
    white-space: nowrap;
}

.pdf-pos-stamp-body {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary);
    font-size: 1.2rem;
    padding: 4px;
}

.pdf-pos-stamp-footer {
    font-size: 6px;
    text-align: center;
    color: var(--text-muted);
    padding: 2px 6px;
    border-top: 1px solid #eee;
    white-space: nowrap;
}

.pdf-pos-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
    margin-top: 16px;
}

@media (max-width: 600px) {
    .pdf-pos-modal-content {
        padding: 16px;
        max-height: 95vh;
    }
    .pdf-pos-actions {
        flex-direction: column;
    }
}
