/* =========================================================
   Design Tokens
   ========================================================= */

:root {
    --primary-color: #a23F97;
    --primary-color-dark: #752e6d;

    --secondary-color: #AB3323;
    --secondary-color-dark: #7e251a;

    --danger-color: #dc2626;
    --danger-color-dark: #b91c1c;

    --border-color: #ddd;
    --background-color: #f5f7fb;
}

/* =========================================================
   Global Layout
   ========================================================= */

body {
    font-family: system-ui, -apple-system, sans-serif;
    background: var(--background-color);
    margin: 0;
    padding: 0;
}

/* =========================================================
   Containers
   ========================================================= */


.container,
.table-container {
    margin: 70px auto;
    background: white;
    padding: 30px;
    border-radius: 14px;
    box-shadow: 0 4px 18px rgba(0, 0, 0, 0.06);
}

.container {
    max-width: 520px;
}

.table-container {
    max-width: 1000px;
}

/* =========================================================
   Typography & Links
   ========================================================= */

h2 {
    padding: 0;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 22px;
}

h3 {
    padding: 0;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 18px;
}

h4 {
    padding: 0;
    margin-top: 0;
    margin-bottom: 10px;
    font-size: 14px;
    color: #727272;
}

a {
    color: #000;
    text-decoration: none;
    transition: 0.5s;
}

a:hover {
    color: var(--primary-color);
}

/* =========================================================
   Form Elements
   ========================================================= */

.form-group {
    margin-bottom: 18px;
}

.form-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

label {
    display: block;
    font-size: 14px;
    margin-bottom: 6px;
    color: #333;
}

input[type="text"],
input[list],
select {
    width: 100%;
    padding: 10px;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    font-size: 14px;
    background: white;
    box-sizing: border-box;
}

.checkbox-row {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 10px;
}

/* =========================================================
   Buttons
   ========================================================= */

.button {
    background: var(--primary-color);
    color: white;
    padding: 10px 14px; 
    border-radius: 8px;
    font-size: 14px;
    transition: 0.5s ease;
    outline: none;
    border: none;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.button:hover {
    background: var(--primary-color-dark);
    color: white;
}

.primary-button {
    background: var(--primary-color);
}

.delete-button {
    background: var(--danger-color);
}

.delete-button:hover {
    background: var(--danger-color-dark);
}

/* Small icon buttons */

.small-button {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 6px;
    cursor: pointer;
    transition: 0.5s ease;
}

.small-button i {
    font-size: 13px;
}

.small-button:hover {
    color: var(--primary-color);
}

/* =========================================================
   Table
   ========================================================= */

.table-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.form-actions {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th,
td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #eee;
    font-size: 14px;
}

th {
    cursor: pointer;
    user-select: none;
    font-weight: 600;
}

th.sortable:hover {
    color: var(--primary-color);
}

.sort-indicator {
    margin-left: 6px;
    font-size: 12px;
}



.landing-container {
    max-width: 600px;
    margin: 120px auto;
    text-align: center;
}

.logo-placeholder {
    width: 120px;
    height: 120px;
    margin: 0 auto 30px auto;
    border-radius: 20px;

    background-color: #f1f5f9;
    background-image: url("/static/img/anit_logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #94a3b8;
    font-size: 14px;
}

.landing-subtitle {
    color: #666;
    font-size: 16px;
}

.landing-title {
    font-size: 36px;
    margin: 10px 0 30px 0;
    font-weight: 600;
}

.help-box {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    padding: 14px;
    border-radius: 10px;
    margin: 30px 0 20px 0;
    font-size: 14px;
    color: #475569;
}



.top-bar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;

    background-color: #252525;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 6px 16px;

    z-index: 1000;
    height: 40px;
}

/* Left side */
.top-bar-left {
    display: flex;
    align-items: center;
}

/* Right side */
.top-bar-right {
    display: flex;
    align-items: center;
    gap: 14px;
    padding-right: 20px;
}

.app-title {
    color: #f8fafc !important;
    font-size: 15px;
    font-weight: 500;
}

.app-title-logo {

    width: 30px;
    height: 30px;
    margin-right:10px;

    background-image: url("/static/img/anit_logo.png");
    background-size: contain;
    background-repeat: no-repeat;
    background-position: center;

    color: #f8fafc !important;
    font-size: 13px;
    font-weight: 500;
}

.user-name {
    font-size: 14px;
    color: #f8fafc;
    font-weight: 600;
    line-height: 18px;
}

.logout-button {

    background-color: var(--primary-color);
    color: #f8fafc !important;

    width: 28px;
    height: 28px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border-radius: 6px;

    cursor: pointer;

    font-size: 13px;

    transition: 0.3s;
}

.logout-button:hover {
    background-color: var(--primary-color-dark);
}

.logout-button a {
    color: #f8fafc !important;
}


.app-item {
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
    margin-top: 6px;
    font-size: 14px;
}


.form-row {
    display: flex;
    align-items: center;
    margin-bottom: 12px;
}

.form-row label {
    width: 160px;
    font-size: 14px;
    color: #333;
    flex-shrink: 0;
}

.form-row input,
.form-row select {
    flex: 1;
}

.inputPanel {
    display: none;
    margin-top: 12px;
    padding: 6px;
    border-radius: 6px;
    background-color: #eee;
    font-size: 0.8em !important;
}


/* =========================================================
   Mobile Responsive
   ========================================================= */

@media (max-width: 768px) {

    /* Containers */

    .container,
    .table-container {
        margin: 60px 12px;
        padding: 18px;
        border-radius: 10px;
    }

    /* Landing */

    .landing-container {
        margin: 80px 16px;
    }

    .landing-title {
        font-size: 28px;
    }

    /* Top bar */

    .top-bar {
        padding: 6px 12px;
        height: auto;
    }

    .app-title {
        font-size: 14px;
    }

    .user-name {
        display: none; /* hide username to save space */
    }

    /* Forms */

    .form-row {
        flex-direction: column;
        align-items: flex-start;
        gap: 6px;
    }

    .form-row label {
        width: 100%;
    }

    /* Buttons */



    .form-actions {
        flex-direction: column;
        gap: 10px;
    }

    /* Tables */

    .table-container {
        overflow-x: auto;
    }

    table {
        min-width: 600px;
    }

}