:root {
    --black: #000000;
    --primary: #602d8f;
    --primary-light: #8a56b5;
    --white: #ffffff;
    --gray: #f5f5f5;
    --text: #2d2038;
    --shadow: 0 18px 45px rgba(96, 45, 143, 0.14);
    --radius: 24px;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: "Poppins", sans-serif;
    background: linear-gradient(135deg, #f7f3fb 0%, #ffffff 100%);
    color: var(--text);
}

a {
    text-decoration: none;
}

.auth-body {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 24px;
}

.auth-wrapper {
    width: min(1080px, 100%);
}

.auth-card {
    background: var(--white);
    border-radius: 32px;
    overflow: hidden;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    box-shadow: var(--shadow);
}

.auth-hero {
    padding: 56px;
    background: linear-gradient(160deg, var(--black), var(--primary));
    color: var(--white);
}

.hero-chip,
.badge-soft {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border-radius: 999px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.12);
    font-size: 12px;
}

.auth-hero h1 {
    font-size: 2.5rem;
    margin: 22px 0 14px;
}

.auth-form {
    padding: 56px;
}

.stylish-input .input-group-text,
.stylish-input .form-control {
    border-radius: 18px;
    background: #fbf9fd;
}

.stylish-input .input-group-text {
    border-right: 0;
}

.stylish-input .form-control {
    border-left: 0;
}

.app-shell {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 290px;
    padding: 28px;
    background: linear-gradient(180deg, var(--black), var(--primary));
    color: var(--white);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand-box {
    display: flex;
    gap: 16px;
    align-items: center;
}

.brand-box h2 {
    font-size: 1.1rem;
    margin: 0;
}

.brand-box span {
    opacity: 0.8;
    font-size: 0.9rem;
}

.brand-icon {
    width: 56px;
    height: 56px;
    display: grid;
    place-items: center;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.14);
    font-size: 1.4rem;
}

.sidebar-nav {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.sidebar-nav a {
    color: rgba(255, 255, 255, 0.85);
    padding: 14px 16px;
    border-radius: 18px;
    display: flex;
    align-items: center;
    gap: 12px;
    transition: 0.2s ease;
}

.sidebar-nav a:hover,
.sidebar-nav a.active {
    color: var(--white);
    background: rgba(255, 255, 255, 0.12);
    transform: translateX(4px);
}

.app-content {
    flex: 1;
    padding: 28px;
}

.topbar,
.section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.page-title {
    font-size: 2rem;
    margin-bottom: 4px;
}

.page-subtitle {
    color: #725f82;
}

.topbar-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

.content-wrapper {
    margin-top: 28px;
}

.glass-card {
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(138, 86, 181, 0.12);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 24px;
}

.stat-card {
    min-height: 210px;
}

.stat-card small {
    color: #816898;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

.stat-card h3 {
    margin: 14px 0 10px;
    font-size: 1.8rem;
}

.stat-icon {
    width: 52px;
    height: 52px;
    display: inline-grid;
    place-items: center;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--white);
    border-radius: 18px;
    font-size: 1.4rem;
    margin-bottom: 18px;
}

.custom-table thead th {
    color: #7b6d88;
    border-bottom-color: rgba(96, 45, 143, 0.12);
}

.custom-table tbody td {
    padding-top: 16px;
    padding-bottom: 16px;
    border-bottom-color: rgba(96, 45, 143, 0.08);
}

.badge-soft {
    background: rgba(96, 45, 143, 0.12);
    color: var(--primary);
}

.preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
    gap: 14px;
}

.preview-item {
    position: relative;
    display: block;
    border-radius: 18px;
    overflow: hidden;
    background: #f1ecf6;
    min-height: 140px;
}

.preview-item img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.preview-delete {
    position: absolute;
    top: 10px;
    right: 10px;
    border-radius: 999px;
}

.details-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px;
}

.details-grid span {
    display: block;
    font-size: 0.85rem;
    color: #7b6d88;
}

.description-box {
    background: #faf8fc;
    border-radius: 20px;
    padding: 20px;
    line-height: 1.8;
}

.print-body {
    background: #fff;
}

.print-sheet {
    padding: 32px;
}

.print-header,
.print-grid,
.print-gallery {
    display: flex;
    gap: 18px;
    flex-wrap: wrap;
    justify-content: space-between;
}

.print-grid > div {
    width: calc(50% - 10px);
}

.print-logo {
    max-height: 70px;
}

.print-section {
    margin-top: 24px;
}

.print-gallery img {
    width: 180px;
    border-radius: 12px;
}

.signature-box {
    margin-top: 48px;
    padding-top: 12px;
    border-top: 1px solid #000;
    width: 280px;
}

.pagination .page-link {
    border: 0;
    color: var(--primary);
    border-radius: 999px;
    margin: 0 4px;
}

.pagination .active .page-link {
    background: var(--primary);
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: 0;
}

.form-control,
.form-select {
    border-radius: 16px;
    padding: 0.9rem 1rem;
    border-color: rgba(96, 45, 143, 0.18);
}

@media (max-width: 991px) {
    .app-shell {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .auth-card {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 767px) {
    .app-content,
    .auth-hero,
    .auth-form {
        padding: 22px;
    }

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

    .print-grid > div {
        width: 100%;
    }

    .page-title {
        font-size: 1.5rem;
    }
}

@media print {
    .sidebar,
    .topbar,
    .btn,
    .toast-container {
        display: none !important;
    }

    .app-content,
    .content-wrapper,
    .glass-card {
        padding: 0;
        box-shadow: none;
        border: 0;
    }
}
