@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=Libre+Baskerville:wght@400;700&family=Great+Vibes&display=swap');

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

body {
    font-family: 'Inter', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    height: 100vh;
    overflow: hidden;
    color: #333;
    display: flex;
    flex-direction: column;
}

.container {
    flex: 1;
    display: grid;
    grid-template-columns: 280px 1fr;
    gap: 0;
    overflow: hidden;
    width: 100vw;
    max-width: 100vw;
}

.sidebar {
    background: #1e1e2e;
    padding: 20px;
    height: calc(100vh - 56px);
    overflow-y: auto;
    overflow-x: hidden;
    color: #e0e0e0;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar h1 {
    font-family: 'Libre Baskerville', serif;
    font-size: 20px;
    margin-bottom: 8px;
    color: #fff;
}

.sidebar p {
    font-size: 12px;
    color: #888;
    margin-bottom: 20px;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    font-weight: 500;
    margin-bottom: 6px;
    font-size: 12px;
    color: #aaa;
}

.form-group select,
.form-input {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #3a3a4a;
    border-radius: 8px;
    font-size: 13px;
    font-family: 'Inter', sans-serif;
    background: #2a2a3a;
    color: #e0e0e0;
    transition: all 0.3s ease;
}

.form-group select {
    cursor: pointer;
}

.form-group select:focus,
.form-input:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 4px rgba(102, 126, 234, 0.1);
}

.form-group select:disabled {
    background: #f5f5f5;
    cursor: not-allowed;
    opacity: 0.6;
}

.input-with-button {
    display: flex;
    gap: 8px;
}

.input-with-button .form-input {
    flex: 1;
}

.btn-icon {
    padding: 12px 16px;
    background: #f5f5f5;
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.btn-icon:hover {
    background: #667eea;
    border-color: #667eea;
    transform: scale(1.05);
}

.btn {
    width: 100%;
    padding: 14px 20px;
    border: none;
    border-radius: 12px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-bottom: 12px;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.6);
}

.btn-secondary {
    background: white;
    color: #667eea;
    border: 2px solid #667eea;
}

.btn-secondary:hover {
    background: #667eea;
    color: white;
}

.btn-success {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #eb3349, #f45c43);
    color: white;
}

.btn-group {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 2px solid #f0f0f0;
    text-align: center;
}

input[type="file"] {
    display: none;
}

.preview-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    padding: 30px;
    height: calc(100vh - 56px);
    overflow: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    /* Hide scrollbar but keep scroll functionality */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
}

.preview-section::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari, Opera */
}

.placeholder-text {
    font-size: 18px;
    color: rgba(255, 255, 255, 0.6);
    text-align: center;
}

.placeholder-card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 60px 50px;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    max-width: 500px;
}

.placeholder-icon {
    font-size: 80px;
    margin-bottom: 20px;
    animation: bounce 2s infinite;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-10px);
    }
}

.placeholder-title {
    font-family: 'Libre Baskerville', serif;
    font-size: 32px;
    margin-bottom: 15px;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.placeholder-subtitle {
    font-size: 16px;
    color: #666;
    margin-bottom: 35px;
    line-height: 1.6;
}

.social-links {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.social-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 14px 28px;
    border-radius: 12px;
    text-decoration: none;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.social-btn.github {
    background: #24292e;
    color: white;
}

.social-btn.github:hover {
    background: #1a1e22;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(36, 41, 46, 0.4);
}

.social-btn.coffee {
    background: #FFDD00;
    color: #000;
}

.social-btn.coffee:hover {
    background: #ffcc00;
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(255, 221, 0, 0.4);
}

/* LARGE CARD - 900px for maximum visibility */
.id-card {
    /* Removed width: 100% to allow fixed width on horizontal cards */
    max-width: 900px;
    background: white;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    margin: 0 auto;
    position: relative;
}

.horizontal-card {
    aspect-ratio: 85.6 / 54;
    width: 700px;
    /* Fixed larger width */
    max-width: 100%;
}

/* Horizontal Card - Optimized Layout */
.horizontal-card .card-header {
    padding: 15px 25px;
}

.horizontal-card .university-logo {
    width: 55px;
    height: 55px;
}

.horizontal-card .university-name {
    font-size: 24px;
}

.horizontal-card .university-full-name {
    font-size: 12px;
}

.horizontal-card .card-content {
    padding: 15px 25px;
    align-items: center;
    /* Center vertically */
}


.horizontal-card .info-row .value {
    font-size: 13px;
}

.horizontal-card .info-row .id-number {
    font-size: 14px !important;
}

.horizontal-card .info-row .email {
    font-size: 12px !important;
}

.horizontal-card .card-footer {
    padding: 12px 25px;
}

.horizontal-card .signature-text {
    font-size: 24px;
}

.horizontal-card .signature-label {
    font-size: 9px;
}

.horizontal-card .barcode-svg {
    width: 90px;
    height: 28px;
}

.horizontal-card .barcode-number {
    font-size: 10px;
}

.vertical-card {
    aspect-ratio: 54 / 85.6;
    width: 500px;
}

.glass-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.3), rgba(255, 255, 255, 0.05));
    pointer-events: none;
    opacity: 0.4;
    mix-blend-mode: overlay;
}

.card-header {
    padding: 24px;
    color: white;
    display: flex;
    align-items: center;
    gap: 18px;
    position: relative;
    z-index: 1;
}

.university-logo {
    width: 70px;
    height: 70px;
    object-fit: contain;
    background: white;
    padding: 10px;
    border-radius: 12px;
}

.university-info {
    flex: 1;
}

.university-name {
    font-family: 'Libre Baskerville', serif;
    font-size: 28px;
    font-weight: 700;
    margin-bottom: 5px;
}

.university-full-name {
    font-size: 14px;
    opacity: 0.95;
}

.card-content {
    padding: 30px;
    display: flex;
    gap: 25px;
    position: relative;
    z-index: 1;
}

.horizontal-card .card-content {
    flex-direction: row;
}

.vertical-card .card-content {
    flex-direction: column;
    align-items: center;
}

.student-photo {
    width: 140px;
    height: 140px;
    object-fit: cover;
    border-radius: 14px;
    border: 4px solid white;
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.2);
}

.vertical-card .student-photo {
    width: 160px;
    height: 160px;
}

.student-info {
    flex: 1;
}

.vertical-card .student-info {
    width: 100%;
}

.info-row {
    margin-bottom: 12px;
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.info-row .label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    text-transform: uppercase;
    letter-spacing: 0.6px;
}

.info-row .value {
    font-size: 16px;
    font-weight: 500;
    color: #333;
}

.info-row .id-number {
    font-family: 'Courier New', monospace;
    font-weight: 700;
    color: #667eea;
    font-size: 18px;
}

.info-row .email {
    font-size: 14px;
    color: #666;
}

.card-footer {
    padding: 24px 30px;
    background: rgba(0, 0, 0, 0.02);
    border-top: 1px solid rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: relative;
    z-index: 1;
}

.signature {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.signature-text {
    font-family: 'Great Vibes', cursive;
    font-size: 32px;
    color: #333;
}

.signature-label {
    font-size: 11px;
    color: #999;
    text-transform: uppercase;
}

.barcode {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.barcode-svg {
    width: 110px;
    height: 35px;
}

.barcode-number {
    font-family: 'Courier New', monospace;
    font-size: 11px;
    color: #666;
}

.social-footer {
    margin-top: 25px;
    padding: 15px 25px;
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 15px;
}

.social-link-small {
    display: flex;
    align-items: center;
    gap: 6px;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.3s ease;
}

.social-link-small:hover {
    color: white;
    transform: translateY(-1px);
}

.social-divider {
    color: rgba(255, 255, 255, 0.4);
    font-size: 16px;
}

@media (max-width: 1200px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        position: static;
    }
}

@media (max-width: 768px) {
    body {
        padding: 10px;
    }

    .id-card {
        max-width: 100%;
    }

    .vertical-card {
        width: 100%;
        max-width: 400px;
    }

    .social-links {
        flex-direction: column;
    }

    .social-footer {
        flex-direction: column;
        gap: 10px;
    }

    .social-divider {
        display: none;
    }
}

/* ==================== */
/* ID CARD BACK SIDE    */
/* ==================== */

.cards-container {
    display: flex;
    gap: 30px;
    flex-wrap: wrap;
    justify-content: center;
    align-items: flex-start;
}

.card-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 10px;
}

.card-label {
    display: none;
    /* Hidden - not necessary */
}

.id-card-back {
    width: 700px;
    max-width: 100%;
    aspect-ratio: 85.6 / 54;
    background: #f5f5f5;
    border-radius: 16px;
    box-shadow: 0 25px 70px rgba(0, 0, 0, 0.6);
    overflow: hidden;
    position: relative;
}

.id-card-back.vertical-card {
    width: 500px;
    aspect-ratio: 54 / 85.6;
}

.card-back-header {
    padding: 12px 20px;
    color: white;
}

.back-label {
    font-size: 11px;
    font-weight: 700;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.card-back-content {
    padding: 20px;
    display: flex;
    flex-direction: column;
    height: calc(100% - 50px);
}

.back-address {
    margin-bottom: 15px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ddd;
}

.address-text {
    margin: 0;
    font-size: 13px;
    color: #333;
    line-height: 1.5;
}

.address-text:first-child {
    font-weight: 600;
    color: #007bff;
    font-size: 14px;
}

.back-terms {
    flex: 1;
}

.terms-text {
    font-size: 11px;
    color: #555;
    line-height: 1.6;
    margin: 0 0 15px 0;
}

.emergency-contact {
    background: rgba(0, 0, 0, 0.03);
    padding: 10px;
    border-radius: 8px;
    margin-top: 10px;
}

.contact-label {
    font-size: 10px;
    font-weight: 700;
    color: #333;
    letter-spacing: 0.5px;
}

.contact-info {
    font-size: 11px;
    color: #666;
    margin: 3px 0;
}

.back-signature-section {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: auto;
    padding-top: 15px;
    border-top: 1px solid #ddd;
}

.signature-box {
    display: flex;
    flex-direction: column;
}

.signature-text-back {
    font-family: 'Great Vibes', cursive;
    font-size: 28px;
    color: #333;
}

.signature-label-back {
    font-size: 9px;
    color: #999;
    text-transform: uppercase;
    margin-top: 5px;
}

.back-photo {
    width: 60px;
    height: 60px;
    border-radius: 8px;
    overflow: hidden;
    border: 2px solid #ddd;
}

.back-photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

@media (max-width: 1500px) {
    .cards-container {
        flex-direction: column;
        align-items: center;
    }
}

@media (max-width: 768px) {
    .id-card-back {
        width: 100%;
        max-width: 400px;
    }

    .cards-container {
        gap: 20px;
    }
}

/* ==================== */
/* TOP NAVIGATION BAR   */
/* ==================== */

.top-nav {
    background: rgba(30, 30, 40, 0.95);
    backdrop-filter: blur(10px);
    padding: 12px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.nav-left,
.nav-right {
    display: flex;
    gap: 10px;
    align-items: center;
}

.nav-center {
    display: flex;
    gap: 5px;
    background: rgba(255, 255, 255, 0.1);
    padding: 4px;
    border-radius: 10px;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 10px 20px;
    background: linear-gradient(135deg, #2563eb, #1d4ed8);
    border-radius: 8px;
    font-weight: 600;
    font-size: 14px;
    transition: all 0.3s ease;
}

.nav-link:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(37, 99, 235, 0.4);
}

.nav-tab {
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.7);
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
}

.nav-tab:hover {
    color: white;
    background: rgba(255, 255, 255, 0.1);
}

.nav-tab.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    color: white;
}

.nav-btn {
    border: none;
    padding: 10px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
    transition: all 0.3s ease;
}

.download-btn {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.download-btn:hover {
    background: rgba(255, 255, 255, 0.2);
}

.download-zip {
    background: linear-gradient(135deg, #11998e, #38ef7d);
    color: white;
}

.download-zip:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(17, 153, 142, 0.4);
}

@media (max-width: 1200px) {
    .top-nav {
        flex-wrap: wrap;
        gap: 15px;
        padding: 15px;
    }

    .nav-center {
        order: 3;
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-right {
        flex-wrap: wrap;
        justify-content: center;
    }

    .nav-tab {
        padding: 8px 12px;
        font-size: 12px;
    }
}

/* ==================== */
/* MODE & DOC TABS      */
/* ==================== */

.nav-section {
    display: flex;
    align-items: center;
    gap: 8px;
}

.nav-label {
    color: rgba(255, 255, 255, 0.7);
    font-size: 12px;
    font-weight: 500;
}

.mode-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
    padding: 8px 16px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 13px;
    transition: all 0.3s ease;
}

.mode-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
}

.mode-btn.active {
    background: linear-gradient(135deg, #667eea, #764ba2);
    border-color: transparent;
    color: white;
}

.doc-tab {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 8px 14px;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 500;
    font-size: 12px;
    transition: all 0.3s ease;
}

.doc-tab:hover {
    background: rgba(255, 255, 255, 0.2);
}

.doc-tab.active {
    background: #10b981;
    color: white;
}

.nav-mode {
    background: rgba(0, 0, 0, 0.2);
    padding: 6px 12px;
    border-radius: 8px;
}

.nav-docs {
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
}

.nav-view {
    background: rgba(0, 0, 0, 0.2);
    padding: 4px;
    border-radius: 8px;
}

/* ==================== */
/* DOCUMENT TEMPLATES   */
/* ==================== */

.documents-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
    padding: 20px;
    max-width: 1400px;
    margin: 0 auto;
}

.extra-docs {
    grid-template-columns: repeat(auto-fit, minmax(400px, 1fr));
}

.document-preview {
    background: white;
    border-radius: 12px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    overflow: hidden;
    font-size: 11px;
    color: #333;
}

.doc-header {
    padding: 15px 20px;
    color: white;
    text-align: center;
}

.doc-header h3 {
    margin: 0;
    font-size: 14px;
    font-weight: 700;
}

.doc-header p {
    margin: 5px 0 0;
    font-size: 10px;
    opacity: 0.9;
}

.doc-title {
    text-align: center;
    font-size: 13px;
    font-weight: 700;
    padding: 15px;
    background: #f5f5f5;
    border-bottom: 1px solid #eee;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.doc-content {
    padding: 15px 20px;
}

.doc-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
    border-bottom: 1px dotted #eee;
}

.doc-row span:first-child {
    font-weight: 600;
    color: #555;
}

.doc-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 15px;
    font-size: 10px;
}

.doc-table th {
    background: #f9f9f9;
    padding: 8px;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid #ddd;
}

.doc-table td {
    padding: 6px 8px;
    border-bottom: 1px solid #eee;
}

.doc-table tr.total td,
.doc-table tr.balance td {
    font-weight: 700;
    background: #f9f9f9;
}

.doc-table tr.balance td {
    color: #10b981;
}

.term-header {
    background: #333;
    color: white;
    padding: 8px 12px;
    margin: 15px 0 10px;
    font-weight: 600;
    font-size: 11px;
    border-radius: 4px;
}

.gpa-box {
    display: flex;
    justify-content: space-between;
    background: #f5f5f5;
    padding: 12px;
    margin-top: 15px;
    border-radius: 6px;
    font-size: 10px;
}

.gpa-box .gpa {
    font-weight: 700;
    color: #2563eb;
}

.schedule-footer {
    text-align: right;
    font-weight: 600;
    margin-top: 15px;
    padding-top: 10px;
    border-top: 2px solid #eee;
}

/* Letter/Certificate Styles */
.doc-letterhead {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    border-bottom: 3px solid;
}

.letterhead-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
}

.letterhead-info h2 {
    margin: 0;
    font-size: 16px;
    color: #333;
}

.letterhead-info p {
    margin: 3px 0 0;
    font-size: 11px;
    color: #666;
}

.letter-content,
.cert-content {
    padding: 25px 30px;
}

.letter-title,
.cert-title {
    text-align: center;
    font-size: 16px;
    font-weight: 700;
    color: #333;
    margin: 0 0 15px;
    text-transform: uppercase;
    letter-spacing: 2px;
}

.letter-date,
.cert-date {
    color: #666;
    font-size: 11px;
    margin-bottom: 20px;
}

.letter-salutation {
    font-weight: 600;
    margin-bottom: 15px;
}

.letter-body,
.cert-body {
    margin: 12px 0;
    line-height: 1.7;
    text-align: justify;
}

.admission-box {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 20px 0;
}

.admission-row {
    display: flex;
    justify-content: space-between;
    padding: 5px 0;
}

.admission-row span:first-child {
    font-weight: 600;
}

.letter-closing {
    margin-top: 20px;
    font-style: italic;
}

.letter-signature,
.cert-signature {
    margin-top: 40px;
    display: flex;
    flex-direction: column;
}

.sig-name {
    font-family: 'Great Vibes', cursive;
    font-size: 24px;
    color: #333;
}

.sig-title {
    font-size: 10px;
    color: #666;
    margin-top: 5px;
}

.cert-header {
    font-weight: 600;
    margin-bottom: 15px;
}

.cert-note {
    font-style: italic;
    color: #666;
    margin-top: 25px;
    font-size: 10px;
}

@media (max-width: 768px) {
    .documents-grid {
        grid-template-columns: 1fr;
    }

    .extra-docs {
        grid-template-columns: 1fr;
    }
}

/* Teacher Certificate Details */
.cert-details {
    background: #f8f9fa;
    border: 1px solid #e9ecef;
    border-radius: 8px;
    padding: 15px;
    margin: 25px 0;
}

.detail-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px dotted #ddd;
}

.detail-row:last-child {
    border-bottom: none;
}

.detail-row span:first-child {
    font-weight: 600;
    color: #555;
}

/* Custom scrollbar for sidebar */
.sidebar::-webkit-scrollbar {
    width: 6px;
}

.sidebar::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar::-webkit-scrollbar-thumb {
    background: #3a3a4a;
    border-radius: 3px;
}

.sidebar::-webkit-scrollbar-thumb:hover {
    background: #4a4a5a;
}

/* Update button colors for dark theme */
.btn-success {
    background: linear-gradient(135deg, #f59e0b, #d97706) !important;
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444, #dc2626) !important;
}

/* Zoom Controls */
.zoom-controls {
    position: fixed;
    bottom: 20px;
    right: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    background: rgba(0, 0, 0, 0.8);
    padding: 10px 15px;
    border-radius: 10px;
    z-index: 100;
}

.zoom-btn {
    width: 32px;
    height: 32px;
    border: none;
    background: #3a3a4a;
    color: white;
    font-size: 18px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s;
}

.zoom-btn:hover {
    background: #5a5a6a;
}

.zoom-level {
    color: white;
    font-size: 13px;
    font-weight: 500;
    min-width: 45px;
    text-align: center;
}

#cardPreview {
    transform-origin: center center;
    transition: transform 0.2s ease;
    cursor: grab;
}

#cardPreview:active {
    cursor: grabbing;
}

/* Individual card dragging */
.card-wrapper {
    cursor: grab;
    transition: box-shadow 0.2s ease;
    position: relative;
}

.card-wrapper:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.card-wrapper:active {
    cursor: grabbing;
}

/* Document preview dragging */
.document-preview {
    cursor: grab;
    transition: box-shadow 0.2s ease, transform 0.1s ease;
    position: relative;
}

.document-preview:hover {
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.4);
}

.document-preview:active {
    cursor: grabbing;
}

/* Fix responsive - prevent extra space on right */
.documents-grid {
    max-width: 100%;
    overflow-x: hidden;
}

@media (max-width: 1200px) {
    .documents-grid {
        grid-template-columns: 1fr 1fr;
    }

    .extra-docs {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 900px) {
    .documents-grid {
        grid-template-columns: 1fr;
    }
}

/* Fix preview section responsive */
.preview-section {
    min-width: 0;
}

#cardPreview {
    max-width: 100%;
}

/* Fix dark area on right - body scrollbar */
body::-webkit-scrollbar {
    width: 0;
    background: transparent;
}

html,
body {
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE/Edge */
    overflow-x: hidden;
}

/* Ensure preview fills to edge - removed extra padding */
.preview-section {
    margin-right: 0;
    padding-right: 30px;
    box-sizing: border-box;
}

/* Container should fill entire width */
.container {
    max-width: 100vw;
    overflow-x: hidden;
}

/* Responsive - hide dark background on narrow screens */
@media (max-width: 768px) {
    .container {
        grid-template-columns: 1fr;
    }

    .sidebar {
        display: none;
    }

    .preview-section {
        width: 100vw;
        min-width: 100vw;
    }
}

/* Ensure preview covers full remaining width */
.preview-section {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    width: 100%;
    min-width: 0;
    flex: 1;
}

/* Match body background to preview when sidebar hidden */
@media (max-width: 768px) {
    body {
        background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    }
}

/* Fix document dragging - need position for transforms */
.documents-grid {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
    justify-content: center;
    position: relative;
}

.documents-grid .document-preview {
    position: relative;
    cursor: grab;
    user-select: none;
}

.documents-grid .document-preview:active {
    cursor: grabbing;
    z-index: 1000;
}

/* Allow documents to move outside container */
#cardPreview {
    overflow: visible;
}

/* ID Card dragging for Front/Back views */
.id-card,
.id-card-back {
    cursor: grab;
    position: relative;
}

.id-card:active,
.id-card-back:active {
    cursor: grabbing;
}

/* CRITICAL: Fix dark area on right side */
html {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

body {
    width: 100vw;
    max-width: 100vw;
    overflow-x: hidden;
}

/* Ensure preview section fills remaining space */
.preview-section {
    flex: 1;
    min-width: 0;
    width: 100%;
}