/* =========================================================
   HASP SYSTEM — STATIC ADMIN PROTOTYPE
   Soft, clean and eye-friendly UI
   ========================================================= */

:root {
    --page-bg: #f5f8fc;
    --panel-bg: rgba(255, 255, 255, 0.88);
    --white: #ffffff;

    --text-main: #1f2f46;
    --text-muted: #738198;
    --border: #dfe7f1;

    --blue: #4c8fe8;
    --blue-soft: #eaf3ff;
    --blue-line: #a9cdf9;

    --green: #4aaa79;
    --green-soft: #edf9f3;
    --green-line: #b8dfca;

    --danger: #ef5858;

    --shadow-soft: 0 16px 45px rgba(46, 73, 105, 0.10);
    --shadow-card: 0 10px 26px rgba(46, 73, 105, 0.08);

    --sidebar-width: 225px;
    --topbar-height: 74px;
}

* {
    box-sizing: border-box;
}

html {
    min-width: 320px;
}

body {
    margin: 0;
    min-height: 100vh;
    overflow: hidden;
    color: var(--text-main);
    background:
        radial-gradient(circle at 30% 20%, #ffffff 0, transparent 35%),
        linear-gradient(145deg, #f8fbff 0%, #eef3f9 100%);
    font-family: Inter, "Segoe UI", Arial, sans-serif;
}

button,
input,
select,
textarea {
    font: inherit;
}

button {
    border: 0;
}

.app-shell {
    width: 100%;
    min-height: 100vh;
    margin: 0;
    display: grid;
    grid-template-columns: var(--sidebar-width) minmax(0, 1fr);
    overflow: hidden;
    border: 1px solid rgba(203, 216, 231, 0.85);
    border-radius: 0;
    background: rgba(255, 255, 255, 0.70);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

/* SIDEBAR */

.sidebar {
    position: relative;
    z-index: 20;
    min-height: 100vh;
    padding: 24px 14px 18px;
    display: flex;
    flex-direction: column;
    border-right: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.94);
}

.brand {
    min-height: 42px;
    margin: 0 10px 24px;
    display: flex;
    align-items: center;
    gap: 11px;
    font-size: 19px;
    font-weight: 700;
    letter-spacing: -0.3px;
}

.brand-icon {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 11px;
    color: var(--blue);
    background: var(--blue-soft);
    font-size: 20px;
}

.sidebar-nav {
    display: grid;
    gap: 7px;
}

.nav-item,
.logout-button {
    width: 100%;
    min-height: 44px;
    padding: 0 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 11px;
    color: #53647b;
    background: transparent;
    cursor: pointer;
    text-align: left;
    transition: 180ms ease;
}

.nav-item i,
.logout-button i {
    width: 20px;
    font-size: 17px;
}

.nav-item:hover {
    color: var(--text-main);
    background: #f4f7fb;
}

.nav-item.active {
    color: #2568bd;
    background: #eaf3ff;
}

.logout-button {
    margin-top: auto;
    color: var(--danger);
}

.logout-button:hover {
    background: #fff1f1;
}

/* MAIN AREA */

.main-area {
    min-width: 0;
}

.topbar {
    height: var(--topbar-height);
    padding: 0 25px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.58);
}

.topbar-spacer {
    flex: 1;
}

.mobile-menu-button {
    display: none;
    width: 42px;
    height: 42px;
    place-items: center;
    border-radius: 11px;
    color: var(--text-main);
    background: #f1f5fa;
    cursor: pointer;
    font-size: 22px;
}

.admin-profile {
    padding: 6px 8px 6px 6px;
    display: flex;
    align-items: center;
    gap: 9px;
    border-radius: 12px;
    color: var(--text-main);
    background: transparent;
    cursor: pointer;
}

.admin-profile:hover {
    background: #f2f6fb;
}

.profile-avatar {
    width: 34px;
    height: 34px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #71839a;
    background: #e8edf3;
}

.profile-arrow {
    font-size: 12px;
}

.dashboard-content {
    min-height: calc(100vh - var(--topbar-height));
    padding: clamp(28px, 4vh, 52px) clamp(28px, 3vw, 54px) 40px;
}

.welcome-block h1 {
    margin: 0 0 8px;
    font-size: clamp(25px, 3vw, 34px);
    letter-spacing: -0.8px;
}

.welcome-block p {
    margin: 0;
    color: var(--text-muted);
    font-size: 16px;
}

.dashboard-grid {
    margin-top: 34px;
    display: grid;
    grid-template-columns: minmax(180px, 220px) minmax(310px, 1fr) minmax(180px, 220px);
    align-items: center;
    gap: 25px;
}

.info-column {
    display: grid;
    gap: 18px;
}

.info-card {
    min-height: 114px;
    padding: 20px;
    display: flex;
    align-items: flex-start;
    gap: 15px;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.74);
    box-shadow: 0 6px 18px rgba(53, 78, 106, 0.04);
}

.info-icon {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    display: grid;
    place-items: center;
    border-radius: 12px;
    font-size: 20px;
}

.info-icon.success {
    color: #299666;
    background: var(--green-soft);
}

.info-icon.blue {
    color: #377ed8;
    background: var(--blue-soft);
}

.info-icon.neutral {
    color: #71839a;
    background: #f0f4f8;
}

.info-card > div:last-child {
    min-width: 0;
    display: grid;
    gap: 6px;
}

.info-label,
.info-card small {
    color: var(--text-muted);
}

.info-card strong {
    font-size: 17px;
    font-weight: 650;
}

.info-card small {
    font-size: 12px;
}

.success-text {
    color: #2d9d6b !important;
}

.blue-text {
    color: #2d70cf;
}

.online-dot {
    width: 6px;
    height: 6px;
    margin-right: 4px;
    display: inline-block;
    border-radius: 50%;
    background: #32aa72;
}

/* MODULE SELECTOR */

.module-selector-card {
    min-height: 390px;
    padding: 40px 35px 30px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    border: 1px solid #d7e1ec;

    /* Dairə əvəzinə küncləri oval kvadrat */
    border-radius: 36px;

    background:
        linear-gradient(
            145deg,
            rgba(255, 255, 255, 0.98),
            rgba(245, 249, 253, 0.92)
        );

    box-shadow:
        0 18px 45px rgba(46, 73, 105, 0.11),
        inset 0 0 0 10px rgba(255, 255, 255, 0.30);
}

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

.selector-heading h2 {
    margin: 0 0 7px;
    font-size: 20px;
}

.selector-heading p,
.selector-note {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.module-buttons {
    margin: 28px 0 22px;
    display: flex;
    gap: 28px;
}

.module-button {
    width: 155px;
    height: 145px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    gap: 14px;

    /* Yumru yox, küncləri oval kvadrat */
    border-radius: 26px;

    cursor: pointer;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.90);

    transition:
        transform 180ms ease,
        box-shadow 180ms ease;
}

.module-button:hover {
    transform: translateY(-5px);
}

.module-button.hasp {
    border: 1px solid var(--blue-line);
    box-shadow: 0 12px 28px rgba(76, 143, 232, 0.15);
}

.module-button.gmp {
    border: 1px solid var(--green-line);
    box-shadow: 0 12px 28px rgba(74, 170, 121, 0.15);
}

.module-icon {
    width: 68px;
    height: 68px;

    display: grid;
    place-items: center;

    /* İkon fonu da kvadrat */
    border-radius: 20px;

    font-size: 34px;
}

.hasp .module-icon {
    color: var(--blue);
    background: var(--blue-soft);
}

.gmp .module-icon {
    color: var(--green);
    background: var(--green-soft);
}

.module-button span:last-child {
    font-size: 14px;
    font-weight: 650;
}

.selector-note {
    max-width: 230px;
    text-align: center;
    line-height: 1.5;
}

/* RADIAL POPUP */

.radial-overlay {
    position: fixed;
    z-index: 100;
    inset: 0;
    padding: 20px;
    display: grid;
    place-items: center;
    visibility: hidden;
    opacity: 0;
    background: rgba(219, 228, 239, 0.55);
    backdrop-filter: blur(10px);
    transition: 220ms ease;
}

.radial-overlay.open {
    visibility: visible;
    opacity: 1;
}

.radial-dialog {
    position: relative;
    width: min(620px, 96vw);
    min-height: 580px;
    padding: 48px 30px 24px;
    display: grid;
    place-items: center;
    border: 1px solid rgba(255, 255, 255, 0.80);
    border-radius: 34px;
    background: rgba(248, 251, 255, 0.86);
    box-shadow: 0 30px 80px rgba(47, 71, 97, 0.20);
    transform: scale(0.88);
    transition: transform 240ms cubic-bezier(.2,.8,.2,1);
}

.radial-overlay.open .radial-dialog {
    transform: scale(1);
}

.radial-dialog.gmp-mode {
    --accent: var(--green);
    --accent-soft: var(--green-soft);
    --accent-line: var(--green-line);
}

.radial-dialog.hasp-mode {
    --accent: var(--blue);
    --accent-soft: var(--blue-soft);
    --accent-line: var(--blue-line);
}

.radial-close {
    position: absolute;
    top: 20px;
    right: 20px;
    width: 42px;
    height: 42px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: #65768c;
    background: rgba(255, 255, 255, 0.86);
    box-shadow: var(--shadow-card);
    cursor: pointer;
}

.radial-ring {
    position: relative;
    width: 440px;
    height: 440px;
    border: 1px solid var(--accent-line);
    border-radius: 50%;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.88) 0 37%, transparent 38%),
        radial-gradient(circle at center, transparent 0 62%, rgba(255,255,255,0.58) 63% 100%);
    box-shadow: inset 0 0 0 16px rgba(255, 255, 255, 0.30);
}

.radial-ring::before,
.radial-ring::after {
    content: "";
    position: absolute;
    inset: 38px;
    border-radius: 50%;
    border: 1px solid rgba(145, 164, 186, 0.20);
}

.radial-ring::after {
    inset: 118px;
    border-color: var(--accent-line);
}

.radial-center {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 176px;
    height: 176px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 7px;
    transform: translate(-50%, -50%);
    border: 1px solid var(--accent-line);
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 18px 38px rgba(46, 73, 105, 0.11);
}

.radial-center-icon {
    width: 70px;
    height: 70px;
    display: grid;
    place-items: center;
    border-radius: 50%;
    color: var(--accent);
    background: var(--accent-soft);
    font-size: 38px;
}

.radial-center strong {
    font-size: 21px;
}

.radial-center span {
    color: var(--accent);
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
}

.radial-item {
    position: absolute;
    width: 78px;
    height: 78px;
    padding: 7px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 5px;
    border: 1px solid var(--accent-line);
    border-radius: 50%;
    color: var(--text-main);
    background: rgba(255, 255, 255, 0.96);
    box-shadow: var(--shadow-card);
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.radial-item:hover {
    transform: scale(1.08);
    box-shadow: 0 14px 30px rgba(46, 73, 105, 0.16);
}

.radial-item i {
    color: var(--accent);
    font-size: 23px;
}

.radial-item span {
    font-size: 10px;
    line-height: 1.1;
}

.item-1 { left: 181px; top: -32px; }
.item-2 { right: 18px; top: 48px; }
.item-3 { right: -30px; top: 181px; }
.item-4 { right: 18px; bottom: 48px; }
.item-5 { left: 181px; bottom: -32px; }
.item-6 { left: 18px; bottom: 48px; }
.item-7 { left: -30px; top: 181px; }
.item-8 { left: 18px; top: 48px; }

.radial-helper {
    margin: 35px 0 0;
    color: var(--text-muted);
    font-size: 13px;
    text-align: center;
}

/* MOBILE SIDEBAR */

.mobile-sidebar-overlay {
    position: fixed;
    z-index: 15;
    inset: 0;
    display: none;
    background: rgba(25, 40, 60, 0.30);
    backdrop-filter: blur(3px);
}

/* RESPONSIVE */

@media (max-width: 1050px) {
    .dashboard-grid {
        grid-template-columns: 1fr 1.25fr;
    }

    .dashboard-grid > .info-column:last-child {
        grid-column: 1 / -1;
        grid-template-columns: repeat(2, 1fr);
    }

    .module-selector-card {
        border-radius: 34px;
    }
}

@media (max-width: 780px) {
    .app-shell {
        width: 100%;
        min-height: 100vh;
        margin: 0;
        grid-template-columns: 1fr;
        border: 0;
        border-radius: 0;
    }

    .sidebar {
        position: fixed;
        left: -260px;
        top: 0;
        bottom: 0;
        width: 235px;
        min-height: 100vh;
        transition: left 220ms ease;
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .mobile-sidebar-overlay.open {
        display: block;
    }

    .mobile-menu-button {
        display: grid;
    }

    .dashboard-content {
        padding: 28px 20px 40px;
    }

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

    .dashboard-grid > .info-column:last-child {
        grid-column: auto;
        grid-template-columns: 1fr;
    }

    .module-selector-card {
        order: -1;
        min-height: auto;
        border-radius: 28px;
    }

    .radial-dialog {
        min-height: auto;
        padding: 58px 18px 30px;
    }

    .radial-ring {
        width: 340px;
        height: 340px;
        transform: scale(0.88);
    }

    .radial-center {
        width: 144px;
        height: 144px;
    }

    .radial-center-icon {
        width: 58px;
        height: 58px;
        font-size: 30px;
    }

    .radial-center strong {
        font-size: 17px;
    }

    .radial-item {
        width: 68px;
        height: 68px;
    }

    .item-1 { left: 136px; top: -28px; }
    .item-2 { right: 5px; top: 34px; }
    .item-3 { right: -27px; top: 136px; }
    .item-4 { right: 5px; bottom: 34px; }
    .item-5 { left: 136px; bottom: -28px; }
    .item-6 { left: 5px; bottom: 34px; }
    .item-7 { left: -27px; top: 136px; }
    .item-8 { left: 5px; top: 34px; }
}

@media (max-width: 430px) {
    .profile-name,
    .profile-arrow {
        display: none;
    }

    .module-buttons {
        gap: 12px;
    }

    .module-button {
        width: 108px;
        height: 108px;
    }

    .radial-dialog {
        width: 100%;
        overflow: hidden;
    }

    .radial-ring {
        transform: scale(0.72);
        margin: -45px 0;
    }

    .radial-helper {
        margin-top: 0;
    }
}



/* =========================================================
   DOCUMENTS PAGE
   ========================================================= */

.document-page {
    min-height: 100vh;
    padding: 35px;
    background:
        linear-gradient(
            145deg,
            #f8fbff 0%,
            #eef4fa 100%
        );
}

.document-topbar {
    max-width: 1400px;
    margin: 0 auto 25px;
    padding: 25px 30px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border: 1px solid var(--border);
    border-radius: 22px;

    background: rgba(255, 255, 255, 0.88);
    box-shadow: var(--shadow-card);
}

.document-topbar h1 {
    margin: 14px 0 7px;
    font-size: 30px;
}

.document-topbar p {
    margin: 0;
    color: var(--text-muted);
}

.back-button {
    display: inline-flex;
    align-items: center;
    gap: 8px;

    color: #377ed8;
    text-decoration: none;
    font-size: 14px;
    font-weight: 600;
}

.document-module-icon {
    width: 62px;
    height: 62px;

    display: grid;
    place-items: center;

    border-radius: 18px;

    color: var(--green);
    background: var(--green-soft);

    font-size: 28px;
}

.document-create-card,
.document-table-card {
    max-width: 1400px;
    margin: 0 auto 25px;
    padding: 28px 30px;

    border: 1px solid var(--border);
    border-radius: 22px;

    background: rgba(255, 255, 255, 0.90);
    box-shadow: var(--shadow-card);
}

.section-heading {
    margin-bottom: 24px;

    display: flex;
    align-items: center;
    justify-content: space-between;
}

.section-heading h2 {
    margin: 0 0 6px;
    font-size: 20px;
}

.section-heading p {
    margin: 0;
    color: var(--text-muted);
    font-size: 13px;
}

.section-heading > i {
    color: var(--green);
    font-size: 27px;
}

.document-form-grid {
    display: grid;

    grid-template-columns:
        minmax(220px, 2fr)
        minmax(170px, 1fr)
        minmax(220px, 1.5fr)
        auto;

    align-items: end;
    gap: 18px;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    color: #42546b;
    font-size: 13px;
    font-weight: 650;
}

.form-group input {
    width: 100%;
    min-height: 48px;
    padding: 0 14px;

    border: 1px solid #d7e1ec;
    border-radius: 12px;

    outline: none;
    color: var(--text-main);
    background: #ffffff;
}

.form-group input:focus {
    border-color: var(--green);
    box-shadow: 0 0 0 4px rgba(74, 170, 121, 0.10);
}

.form-group input[type="file"] {
    padding: 10px;
}

.save-document-button {
    min-height: 48px;
    padding: 0 22px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 9px;

    border-radius: 12px;

    color: #ffffff;
    background: var(--green);

    cursor: pointer;
    font-weight: 650;

    transition: 180ms ease;
}

.save-document-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 24px rgba(74, 170, 121, 0.25);
}

.document-count {
    padding: 8px 13px;

    border-radius: 10px;

    color: #377ed8;
    background: var(--blue-soft);

    font-size: 13px;
    font-weight: 650;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
}

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

.document-table th {
    padding: 15px 14px;

    color: #64758b;
    background: #f5f8fc;

    text-align: left;
    font-size: 12px;
    font-weight: 700;

    border-bottom: 1px solid var(--border);
}

.document-table td {
    padding: 16px 14px;

    border-bottom: 1px solid #edf1f5;

    color: #42546b;
    font-size: 14px;
}

.document-table tbody tr:hover {
    background: #fafcff;
}

.document-name-cell {
    display: flex;
    align-items: center;
    gap: 12px;
}

.document-name-cell > i {
    width: 40px;
    height: 40px;

    display: grid;
    place-items: center;

    border-radius: 11px;

    color: var(--green);
    background: var(--green-soft);

    font-size: 19px;
}

.document-name-cell div {
    display: grid;
    gap: 4px;
}

.document-name-cell small {
    color: var(--text-muted);
}

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

.table-action-button {
    min-height: 36px;
    padding: 0 12px;

    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;

    border-radius: 9px;

    cursor: pointer;
    text-decoration: none;
    font-size: 12px;
    font-weight: 650;
}

.pdf-button {
    color: #e24848;
    background: #fff0f0;
}

.edit-button {
    color: #3475ca;
    background: #edf5ff;
}

.delete-button {
    color: #e24848;
    background: #fff0f0;
}

.no-pdf-text {
    color: var(--text-muted);
    font-size: 12px;
}

.empty-document-message {
    padding: 55px 20px;

    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;

    color: var(--text-muted);
    text-align: center;
}

.empty-document-message i {
    margin-bottom: 12px;
    font-size: 46px;
}

.empty-document-message h3 {
    margin: 0 0 7px;
    color: var(--text-main);
}

.empty-document-message p {
    margin: 0;
}

/* Planşet və mobil görünüş */
@media (max-width: 1000px) {
    .document-form-grid {
        grid-template-columns: 1fr 1fr;
    }

    .form-button-group {
        grid-column: 1 / -1;
    }
}

@media (max-width: 650px) {
    .document-page {
        padding: 15px;
    }

    .document-topbar,
    .document-create-card,
    .document-table-card {
        padding: 20px;
        border-radius: 17px;
    }

    .document-form-grid {
        grid-template-columns: 1fr;
    }

    .form-button-group {
        grid-column: auto;
    }

    .save-document-button {
        width: 100%;
    }
}