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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f5f5;
    display: flex;
    flex-direction: column;
    height: 100vh;
}

header {
    background: white;
    padding: 20px 40px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 100;
    gap: 40px;
}

.section-title {
    font-size: 28px;
    font-weight: 600;
    color: #666;
    width: 150px;
    flex-shrink: 0;
}

.title-center {
    font-size: 18px;
    font-weight: bold;
    color: #333;
    flex: 1;
    text-align: center;
}

.persona-switcher {
    display: flex;
    flex-direction: column;
    gap: 12px;
    align-items: center;
    flex-shrink: 0;
}

.switcher-buttons {
    display: flex;
    gap: 16px;
}

.persona-btn-wrapper {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
}

.persona-btn {
    width: 50px;
    height: 50px;
    border: 2px solid #ddd;
    background: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
    font-weight: bold;
    text-decoration: none;
}

.persona-btn.procurement {
    background: #eff6ff;
    border-color: #93c5fd;
}

.persona-btn.procurement.active {
    border-width: 3px;
    border-color: #2563eb;
    background: #dbeafe;
}

.persona-btn.governance {
    background: #f0fdf4;
    border-color: #86efac;
}

.persona-btn.governance.active {
    border-width: 3px;
    border-color: #059669;
    background: #dcfce7;
}

.persona-btn.admin {
    background: #fef2f2;
    border-color: #fca5a5;
}

.persona-btn.admin.active {
    border-width: 3px;
    border-color: #dc2626;
    background: #fee2e2;
}

.persona-btn:hover {
    transform: scale(1.08);
}

.persona-label {
    font-size: 12px;
    font-weight: 600;
    color: #666;
    width: 90px;
    text-align: center;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.admin-wrapper {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
}

.cogwheel-btn {
    width: 24px;
    height: 24px;
    background: #dc2626;
    color: white;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s;
}

.cogwheel-btn:hover {
    background: #b91c1c;
}

.cogwheel-menu {
    position: relative;
}

.menu-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 6px;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    min-width: 140px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.menu-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.menu-item {
    display: block;
    padding: 10px 16px;
    color: #374151;
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background-color 0.2s;
}

.menu-item:hover {
    background: #f9fafb;
}

.menu-item:first-child {
    border-radius: 6px 6px 0 0;
}

.menu-item:last-child {
    border-radius: 0 0 6px 6px;
}

main {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    margin: 0;
}

.admin-shell {
    max-width: 1140px;
    margin: 0 auto;
    padding: 8px 0 28px;
}

.admin-layout {
    display: grid;
    gap: 22px;
}

.admin-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin: 0 0 18px 0;
    flex-wrap: wrap;
}

.admin-page-title {
    margin: 0;
    color: #17212b;
    font-size: 1.85rem;
    line-height: 1;
    font-weight: 900;
    letter-spacing: -0.05em;
}

.admin-section-nav {
    display: flex;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
}

.admin-section-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: 8px 14px;
    border-radius: 999px;
    border: 1px solid #fdba74;
    background: rgba(255, 255, 255, 0.9);
    color: #9a3412;
    text-decoration: none;
    font-size: 0.88rem;
    font-weight: 800;
    transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease, box-shadow 160ms ease;
}

.admin-section-button:hover {
    transform: translateY(-1px);
    border-color: #fb923c;
    background: #fff7ed;
}

.admin-section-button.active {
    border-color: #dc2626;
    background: #dc2626;
    color: #ffffff;
    box-shadow: 0 10px 24px rgba(220, 38, 38, 0.18);
}

.admin-flash {
    margin: 0 0 18px 0;
    padding: 14px 16px;
    border-radius: 16px;
    font-size: 0.94rem;
    font-weight: 700;
    box-shadow: 0 14px 28px rgba(15, 23, 42, 0.08);
}

.admin-flash.success {
    background: #dcfce7;
    color: #166534;
    border: 1px solid rgba(34, 197, 94, 0.18);
}

.admin-flash.error {
    background: #fee2e2;
    color: #b91c1c;
    border: 1px solid rgba(239, 68, 68, 0.18);
}

.admin-panel {
    padding: 24px;
    border-radius: 28px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 250, 252, 0.94));
    border: 1px solid rgba(15, 23, 42, 0.08);
    box-shadow: 0 20px 50px rgba(15, 23, 42, 0.08);
}

.admin-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 18px;
    padding-bottom: 14px;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.admin-panel-title {
    margin: 0;
    color: #17212b;
    font-size: 1.45rem;
    line-height: 1.05;
    letter-spacing: -0.03em;
    font-weight: 900;
}

.admin-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 16px;
    border: none;
    border-radius: 12px;
    background: #2563eb;
    color: #ffffff;
    text-decoration: none;
    font-weight: 800;
    font-size: 0.92rem;
    cursor: pointer;
    transition: transform 160ms ease, box-shadow 160ms ease, background 160ms ease;
    box-shadow: 0 10px 24px rgba(37, 99, 235, 0.2);
}

.admin-button:hover {
    transform: translateY(-1px);
}

.admin-button.secondary {
    background: #e2e8f0;
    color: #17212b;
    box-shadow: none;
}

.admin-button.secondary:hover {
    background: #d8e0ea;
}

@media (max-width: 720px) {
    .admin-page-header {
        align-items: flex-start;
    }

    .admin-panel-header {
        align-items: flex-start;
        flex-direction: column;
    }
}
