/* ==========================================
   Career Archive
   Admin Styles
   Version: v0.5
========================================== */

* {
    box-sizing: border-box;
}

/*
====================================================
BODY
====================================================
*/

body {
    height: 100vh;
    margin: 0;
    display: grid;
    grid-template-rows: auto minmax(0, 1fr) auto;
    overflow: hidden;
    font-family: Arial, Helvetica, sans-serif;
    background: #f4f5f7;
    color: #222;
}
/*
====================================================
HEADER
====================================================
*/

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 76px;
    padding: 16px 32px;
    background: #1f2933;
    color: #fff;
    border-bottom: 1px solid #374151;
}

.admin-header-title {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-application-name {
    font-family: Georgia, "Times New Roman", serif;
    font-size: 27px;
    font-weight: bold;
    line-height: 1;
}

.admin-section-name {
    padding-left: 18px;
    color: #cbd5e1;
    border-left: 1px solid #64748b;
    font-size: 14px;
    font-weight: bold;
    letter-spacing: 1.5px;
    text-transform: uppercase;
}

.admin-user-area {
    display: flex;
    align-items: center;
    gap: 22px;
}

.admin-welcome {
    color: #cbd5e1;
    font-size: 14px;
}

.admin-top-nav {
    display: flex;
    align-items: center;
    gap: 18px;
}

.admin-top-nav a {
    color: #fff;
    text-decoration: none;
    font-size: 14px;
    font-weight: bold;
}

.admin-top-nav a:hover {
    color: #cbd5e1;
}


/*
====================================================
MAIN
====================================================
*/

.admin-main {
    min-height: 0;
    padding: 0;
    overflow: hidden;
}

/*
====================================================
LAYOUT
====================================================
*/

.admin-layout {
    display: grid;
    grid-template-columns: 240px minmax(0, 1fr);
    width: 100%;
    height: 100%;
    min-height: 0;
}

/*
====================================================
SIDEBAR
====================================================
*/
.menu-icon {
    width: 20px;
    height: 20px;
    margin-right: 12px;
    vertical-align: middle;
    flex-shrink: 0;
}

.admin-sidebar {
    width: 240px;
    min-height: 0;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    padding: 24px 18px;
    overflow-y: auto;
    background: #1f2933;
    border-right: 1px solid #111827;
}

.sidebar-heading {
    margin-bottom: 24px;
    padding: 0 10px 18px;
    border-bottom: 1px solid #374151;
}

.sidebar-project-name {
    display: block;
    margin-bottom: 5px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    font-weight: bold;
    color: #fff;
}

.sidebar-section-label {
    display: block;
    color: #94a3b8;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.admin-sidebar ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

.admin-sidebar li {
    margin-bottom: 6px;
}

.admin-sidebar a {
    display: block;
    padding: 11px 12px;
    color: #e5e7eb;
    text-decoration: none;
    border-radius: 4px;
    transition:
        background 0.2s ease,
        color 0.2s ease;
}

.admin-sidebar a.active {
    background: #2563eb;
    color: #ffffff;
}

.admin-sidebar a:hover {
    background: #374151;
    color: #ffffff;
}

.sidebar-context {
    margin-top: 30px;
    padding-top: 20px;
    border-top: 1px solid #374151;
}

.sidebar-context h3 {
    margin: 0 0 12px;
    padding: 0 10px;
    color: #94a3b8;
    font-size: 11px;
    letter-spacing: 1.4px;
    text-transform: uppercase;
}

.fsa-context {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 14px;
    background: #111827;
    border: 1px solid #374151;
    border-radius: 6px;
}

.fsa-context-group {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.fsa-context-label {
    color: #94a3b8;
    font-size: 11px;
    font-weight: bold;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.fsa-context-value {
    color: #ffffff;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 16px;
    font-weight: bold;
}

.fsa-context-muted {
    color: #cbd5e1;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 13px;
    font-weight: normal;
}

/*
====================================================
WORKSPACE
====================================================
*/

.admin-workspace {
    min-width: 0;
    min-height: 0;
    padding: 32px;
    overflow-y: auto;
    background: #fff;
}

.admin-workspace h2 {
    margin-top: 0;
}

.admin-workspace h3 {
    margin-top: 30px;
    margin-bottom: 10px;
}

.workspace-placeholder {
    margin-top: 24px;
    min-height: 300px;
    border: 2px dashed #ccc;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
}

/*
====================================================
DASHBOARD CARDS
====================================================
*/

.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 20px;
    margin-top: 24px;
}

.fsa-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 190px;
    padding: 22px;
    background: #ffffff;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(31, 41, 51, 0.08);
}

.fsa-card-content {
    flex: 1;
}

.fsa-card-title {
    margin: 0 0 10px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 21px;
    color: #1f2933;
}

.fsa-card-description {
    margin: 0;
    color: #667085;
    line-height: 1.5;
}

.fsa-card-actions {
    display: flex;
    justify-content: flex-end;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid #e5e7eb;
}

/*
====================================================
FSA TOOLBAR
====================================================
*/

.fsa-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 24px;
    margin-bottom: 24px;
    padding-bottom: 20px;
    border-bottom: 1px solid #e5e7eb;
}

.fsa-toolbar-content {
    flex: 1;
}

.fsa-toolbar-title {
    margin: 0 0 8px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 28px;
    color: #1f2933;
}

.fsa-toolbar-description {
    margin: 0;
    color: #667085;
    line-height: 1.5;
}

.fsa-toolbar-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/*
====================================================
FSA FORMS
====================================================
*/

.fsa-form-panel {
    max-width: 820px;
    margin: 24px 0 32px;
    padding: 24px;
    background: #ffffff;
    border: 1px solid #d7dce2;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(31, 41, 51, 0.08);
}
.fsa-form-header {
    margin-bottom: 24px;
    padding-bottom: 18px;
    border-bottom: 1px solid #e5e7eb;
}

.fsa-form-title {
    margin: 0 0 6px;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    color: #1f2933;
}

.fsa-form-meta {
    margin: 0;
    color: #667085;
    font-size: 14px;
    line-height: 1.5;
}

.fsa-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

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

.fsa-label {
    font-weight: bold;
    color: #1f2933;
}

.fsa-input,
.fsa-select,
.fsa-textarea {
    width: 100%;
    padding: 11px 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    color: #222;
    background: #ffffff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
}

.fsa-input:focus,
.fsa-select:focus,
.fsa-textarea:focus {
    outline: 2px solid #93c5fd;
    border-color: #2563eb;
}

.fsa-textarea {
    min-height: 220px;
    resize: vertical;
    line-height: 1.5;
}

.fsa-form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 10px;
    padding-top: 20px;
    border-top: 1px solid #e5e7eb;
}

/*
====================================================
FORMS
====================================================
*/

label {
    display: block;
    font-weight: bold;
    margin-bottom: 6px;
}

select,
input[type="text"],
textarea {
    width: 100%;
    max-width: 480px;
    padding: 10px;
    margin-bottom: 12px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 14px;
}

button,
input[type="submit"] {
    cursor: pointer;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 4px;
    padding: 10px 16px;
}

button:hover,
input[type="submit"]:hover {
    background: #1d4ed8;
}

/*
====================================================
FSA BUTTONS
====================================================
*/

.fsa-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 38px;
    padding: 9px 15px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 14px;
    font-weight: bold;
    line-height: 1;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    border: 1px solid transparent;
    border-radius: 5px;
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease;
}

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

.fsa-button-primary:hover {
    color: #ffffff;
    background: #1d4ed8;
    border-color: #1d4ed8;
    text-decoration: none;
}

.fsa-button-secondary {
    color: #1f2933;
    background: #ffffff;
    border-color: #cbd5e1;
}

.fsa-button-secondary:hover {
    color: #111827;
    background: #f3f4f6;
    border-color: #94a3b8;
    text-decoration: none;
}

.fsa-button-destructive {
    color: #ffffff;
    background: #dc2626;
    border-color: #dc2626;
}

.fsa-button-destructive:hover {
    color: #ffffff;
    background: #b91c1c;
    border-color: #b91c1c;
    text-decoration: none;
}

/*
====================================================
INFO BLOCK
====================================================
*/

.info-block {
    background: #fafafa;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 20px;
    margin-top: 24px;
    margin-bottom: 20px;
}

/*
====================================================
ITEM EDITOR
====================================================
*/

.editor-panel {
    max-width: 820px;
    margin: 24px 0 32px;
    padding: 24px;
    background: #fff7ed;
    border: 1px solid #fdba74;
    border-radius: 8px;
}

.editor-panel h3 {
    margin: 0 0 6px;
    font-size: 22px;
}

.editor-meta {
    margin: 0 0 24px;
    color: #777;
    font-size: 14px;
}

.editor-field {
    margin-bottom: 18px;
}

.editor-field label {
    display: block;
    margin-bottom: 7px;
    font-weight: bold;
}

.editor-field input,
.editor-field textarea {
    display: block;
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 11px 12px;
    font-family: Arial, Helvetica, sans-serif;
    font-size: 15px;
    color: #222;
    background: #fff;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
}

.editor-field input:focus,
.editor-field textarea:focus {
    outline: 2px solid #93c5fd;
    border-color: #2563eb;
}

.editor-field textarea {
    min-height: 220px;
    resize: vertical;
    line-height: 1.5;
}

.editor-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding-top: 20px;
    margin-top: 24px;
    border-top: 1px solid #fed7aa;
}

.editor-actions button {
    min-width: 130px;
}

.cancel-link {
    display: inline-block;
    padding: 9px 14px;
    color: #555;
    background: #fff;
    border: 1px solid #ccc;
    border-radius: 4px;
    text-decoration: none;
}

.cancel-link:hover {
    color: #222;
    background: #f3f4f6;
    text-decoration: none;
}


/*
====================================================
SECTION HEADINGS
====================================================
*/

.section-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-top: 30px;
    margin-bottom: 10px;
}

.section-heading h3 {
    margin: 0;
}

.add-link {
    display: inline-block;
    padding: 7px 12px;
    background: #16a34a;
    color: #fff;
    text-decoration: none;
    border-radius: 4px;
    font-size: 13px;
}

.add-link:hover {
    background: #15803d;
}

/*
====================================================
MANAGEMENT LISTS
====================================================
*/

.fsa-list-section {
    margin-top: 30px;
}

.fsa-list-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 14px;
}

.fsa-list-heading {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
}

.fsa-list-title {
    margin: 0;
    font-family: Georgia, "Times New Roman", serif;
    font-size: 22px;
    color: #1f2933;
}

.fsa-list-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 28px;
    padding: 0 9px;
    color: #1f2933;
    background: #e5e7eb;
    border-radius: 999px;
    font-size: 13px;
    font-weight: bold;
}

.fsa-list {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.fsa-list-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding: 14px 16px;
    background: #ffffff;
    border: 1px solid #d7dce2;
    border-radius: 7px;
    box-shadow: 0 2px 6px rgba(31, 41, 51, 0.05);
}

.fsa-list-content {
    min-width: 0;
}

.fsa-list-item-title {
    margin: 0 0 5px;
    color: #1f2933;
    font-size: 16px;
}

.fsa-list-meta {
    margin: 0;
    color: #667085;
    font-size: 13px;
}

.fsa-list-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    flex-shrink: 0;
    gap: 8px;
}

.fsa-list-actions .fsa-button {
    min-height: 34px;
    padding: 7px 11px;
    font-size: 13px;
}

.fsa-list-empty {
    margin: 0;
    padding: 16px;
    color: #667085;
    background: #f8fafc;
    border: 1px dashed #cbd5e1;
    border-radius: 7px;
}

/*
====================================================
DRAGGABLE ITEM ORDER
====================================================
*/

.fsa-sortable-list {
    position: relative;
}

.fsa-sortable-item {
    cursor: grab;
    transition:
        border-color 0.15s ease,
        box-shadow 0.15s ease,
        opacity 0.15s ease,
        transform 0.15s ease;
}

.fsa-sortable-item:hover {
    border-color: #94a3b8;
    box-shadow: 0 4px 10px rgba(31, 41, 51, 0.10);
}

.fsa-sortable-item:active {
    cursor: grabbing;
}

.fsa-sortable-item.is-dragging {
    opacity: 0.55;
    border-color: #2563eb;
    box-shadow: 0 8px 18px rgba(31, 41, 51, 0.16);
    transform: scale(0.995);
}

.fsa-drag-handle {
    flex: 0 0 auto;
    width: 38px;
    min-height: 38px;
    padding: 0;
    color: #64748b;
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-size: 20px;
    line-height: 1;
    cursor: grab;
}

.fsa-drag-handle:hover {
    color: #1f2933;
    background: #e5e7eb;
    border-color: #94a3b8;
}

.fsa-drag-handle:active {
    cursor: grabbing;
}

.fsa-order-save-panel {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 18px;
    margin-top: 30px;
    padding: 20px;
    background: #f8fafc;
    border: 1px solid #d7dce2;
    border-radius: 8px;
}

.fsa-order-status {
    margin: 0 auto 0 0;
    color: #667085;
    font-size: 14px;
}

.has-order-changes .fsa-order-save-panel {
    background: #fffbeb;
    border-color: #f59e0b;
}

.has-order-changes .fsa-order-status {
    color: #92400e;
    font-weight: bold;
}

#save-item-order:disabled {
    color: #94a3b8;
    background: #e5e7eb;
    border-color: #d1d5db;
    cursor: not-allowed;
}

/*
----------------------------------------------------
Legacy Compatibility
Remove during Phase 3.7
----------------------------------------------------
*/

.management-list {
    margin-top: 10px;
}

.management-item {
    padding: 12px 15px;
    margin-bottom: 10px;
    background: #ffffff;
    border: 1px solid #dddddd;
    border-radius: 6px;
}

.management-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
}

.management-title {
    font-size: 16px;
    font-weight: bold;
}

.management-meta {
    margin-top: 4px;
    color: #777777;
    font-size: 13px;
}

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

.management-actions a {
    display: inline-block;
    padding: 6px 10px;
    color: #ffffff;
    background: #2563eb;
    border-radius: 4px;
    font-size: 13px;
    text-decoration: none;
}

.management-actions a:hover {
    background: #1d4ed8;
}

.management-actions .delete-link {
    background: #dc2626;
}

.management-actions .delete-link:hover {
    background: #b91c1c;
}

.management-section {
    display: block;
    width: 100%;
    clear: both;
    margin-bottom: 30px;
}

/*
====================================================
TABLES
====================================================
*/

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}

th,
td {
    padding: 10px;
    border: 1px solid #ddd;
    text-align: left;
}

th {
    background: #f0f0f0;
}

/*
====================================================
MESSAGES
====================================================
*/

.fsa-message {
    padding: 12px 16px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 6px;
    line-height: 1.5;
}

.fsa-message-success {
    background: #ecfdf5;
    border-color: #10b981;
    color: #065f46;
}

.fsa-message-error {
    background: #fef2f2;
    border-color: #ef4444;
    color: #991b1b;
}

.fsa-message-warning {
    background: #fffbeb;
    border-color: #f59e0b;
    color: #92400e;
}

/*
----------------------------------------------------
Legacy Compatibility
Remove during Phase 3.7
----------------------------------------------------
*/

.success {
    background: #ecfdf5;
    border: 1px solid #10b981;
    color: #065f46;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}

.error {
    background: #fef2f2;
    border: 1px solid #ef4444;
    color: #991b1b;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
}
/*
====================================================
ADMIN LOGIN
====================================================
*/

.admin-login {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
}

.login-panel {
    width: 100%;
    max-width: 440px;
    padding: 32px;
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 12px 30px rgba(31, 41, 51, 0.12);
}

.login-panel h1 {
    margin: 0 0 10px;
    color: #1f2933;
    font-size: 26px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.login-panel > p {
    margin: 0 0 24px;
    color: #667085;
}

.login-panel .editor-row {
    margin-bottom: 18px;
}

.login-panel input[type="text"],
.login-panel input[type="password"] {
    width: 100%;
    max-width: none;
    padding: 11px 12px;
    margin-bottom: 0;
    border: 1px solid #cbd5e1;
    border-radius: 4px;
    font-size: 15px;
}

.login-panel input[type="text"]:focus,
.login-panel input[type="password"]:focus {
    outline: 2px solid #93c5fd;
    border-color: #2563eb;
}

.login-panel .editor-actions {
    justify-content: space-between;
    border-top: 1px solid #e5e7eb;
}

.login-panel .editor-actions a {
    color: #475569;
    text-decoration: none;
}

.login-panel .editor-actions a:hover {
    color: #1f2933;
    text-decoration: underline;
}

.login-error {
    padding: 12px;
    color: #991b1b !important;
    background: #fef2f2;
    border: 1px solid #ef4444;
    border-radius: 6px;
}


/*
====================================================
FOOTER
====================================================
*/

.admin-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    padding: 18px 32px;
    color: #ffffff;
    background: #000000;
    border-top: 1px solid #111827;
    font-size: 14px;
}

.admin-footer p {
    margin: 0;
    text-align: center;
}

.footer-application {
    font-weight: bold;
}

.footer-version {
    color: #9ca3af;
    font-size: 13px;
}
