/* /www/wwwroot/aidemo.vpsttt.com/config/style.css */

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

body {
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    background-color: #f5f5f5;
    color: #222;
}

/* Container 1080px */

.layout-container {
    max-width: 1080px;
    margin: 0 auto;
    padding: 0 12px;
}

/* Topbar */

.topbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-bottom: 1px solid #e5e5e5;
    z-index: 100;
}

.topbar-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
}

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

.logo-wrap {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    text-decoration: none;
    color: inherit;
}

.logo {
    height: 32px;
    width: auto;
    border-radius: 6px;
}

.brand {
    font-weight: 600;
    font-size: 17px;
}

.welcome {
    font-size: 13px;
    color: #4b5563;
}

/* Main layout + footer */

.page-main {
    min-height: 100vh;
    padding-top: 64px;  /* chừa chỗ cho topbar cố định */
    padding-bottom: 70px; /* chừa chỗ cho footer cố định */
}

.page-footer {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    background-color: #ffffff;
    border-top: 1px solid #e5e5e5;
    padding: 8px 0;
    font-size: 13px;
    color: #777;
}

/* Buttons */

.btn {
    display: inline-block;
    padding: 8px 14px;
    border-radius: 6px;
    border: 1px solid transparent;
    font-size: 14px;
    font-weight: 500;
    text-decoration: none;
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease,
    border-color 0.15s ease, transform 0.05s ease;
}

.btn-primary {
    background-color: #2563eb;
    color: #ffffff;
    border-color: #2563eb;
}

.btn-primary:hover {
    background-color: #1d4ed8;
    border-color: #1d4ed8;
    box-shadow: 0 4px 10px rgba(37, 99, 235, 0.25);
    transform: translateY(-1px);
}

.btn-ghost {
    background-color: transparent;
    color: #374151;
    border-color: #d1d5db;
}

.btn-ghost:hover {
    background-color: #f3f4f6;
}

/* Cards / layout */

.card {
    background-color: #ffffff;
    border-radius: 12px;
    padding: 16px 16px 14px;
    box-shadow: 0 8px 24px rgba(15, 23, 42, 0.04);
    border: 1px solid #e5e7eb;
    margin-bottom: 16px;
}

.card-title {
    font-size: 17px;
    font-weight: 600;
    margin-bottom: 4px;
}

.card-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 12px;
}

/* Grid cho dashboard */

.grid {
    display: grid;
    gap: 12px;
}

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

@media (min-width: 640px) {
    .grid-3 {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (min-width: 960px) {
    .grid-3 {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

.menu-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 130px;
}

.menu-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 4px;
}

.menu-desc {
    font-size: 13px;
    color: #6b7280;
    flex: 1;
    margin-bottom: 10px;
}

/* Login form */

.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: calc(100vh - 140px);
}

.auth-card {
    width: 100%;
    max-width: 420px;
    background-color: #ffffff;
    border-radius: 12px;
    padding: 20px 18px 16px;
    box-shadow: 0 10px 26px rgba(15, 23, 42, 0.08);
    border: 1px solid #e5e7eb;
}

.auth-title {
    font-size: 19px;
    font-weight: 600;
    margin-bottom: 4px;
}

.auth-subtitle {
    font-size: 13px;
    color: #6b7280;
    margin-bottom: 14px;
}

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

.form-label {
    display: block;
    font-size: 13px;
    margin-bottom: 4px;
    color: #4b5563;
}

.form-input,
.form-select,
.form-textarea {
    width: 100%;
    padding: 7px 9px;
    border-radius: 6px;
    border: 1px solid #d1d5db;
    font-size: 14px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
    outline: none;
    border-color: #2563eb;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2);
}

.form-textarea {
    min-height: 70px;
    resize: vertical;
}

/* Alerts */

.alert {
    padding: 8px 10px;
    font-size: 13px;
    border-radius: 6px;
    margin-bottom: 10px;
}

.alert-error {
    background-color: #fef2f2;
    color: #b91c1c;
    border: 1px solid #fee2e2;
}

.alert-success {
    background-color: #ecfdf3;
    color: #166534;
    border: 1px solid #bbf7d0;
}

/* Simple table */

.table-wrapper {
    overflow-x: auto;
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    border-bottom: 1px solid #e5e7eb;
    padding: 6px 8px;
    text-align: left;
    vertical-align: top;
}

.table th {
    background-color: #f9fafb;
    font-weight: 500;
    font-size: 12px;
    color: #4b5563;
}

.table td {
    word-break: break-word;
}

/* Misc */

.text-muted {
    color: #6b7280;
    font-size: 12px;
}

.text-small {
    font-size: 12px;
}

.badge-pill {
    display: inline-block;
    padding: 3px 7px;
    border-radius: 999px;
    font-size: 11px;
    background-color: #eff6ff;
    color: #1d4ed8;
}

/* Filter bar */

.filter-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
    margin-bottom: 10px;
}

.filter-bar .form-input {
    max-width: 220px;
}

.filter-bar .form-select {
    max-width: 180px;
}

/* Action buttons in table */

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

.btn-small {
    padding: 4px 8px;
    font-size: 12px;
}

/* Mobile tweaks */

@media (max-width: 480px) {
    .topbar-inner {
        padding: 6px 0;
    }

    .brand {
        font-size: 15px;
    }

    .welcome {
        display: none;
    }

    .card {
        padding: 14px 12px 10px;
    }
}
