/* Modern CMS Interface Styles */

:root {
    --sidebar-width: 260px;
    --primary-color: #0d6efd;
    --secondary-color: #6c757d;
    --success-color: #198754;
    --danger-color: #dc3545;
    --dark-bg: #1a1d20;
    --sidebar-bg: #2d3035;
    --hover-bg: #3a3d42;
    --text-muted: #6c757d;
    --border-color: #dee2e6;
}

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

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    background: #f8f9fa;
    color: #212529;
}

/* CMS Layout */
.cms-container {
    display: flex;
    height: 100vh;
    overflow: hidden;
}

.cms-sidebar {
    width: var(--sidebar-width);
    background: var(--sidebar-bg);
    color: white;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header {
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h4 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.sidebar-menu {
    list-style: none;
    padding: 1rem 0;
    margin: 0;
}

.sidebar-menu li {
    margin: 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1.5rem;
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    transition: all 0.2s;
}

.sidebar-menu a:hover {
    background: var(--hover-bg);
    color: white;
}

.sidebar-menu li.active a {
    background: var(--primary-color);
    color: white;
}

.sidebar-menu i {
    font-size: 1.2rem;
}

/* Sidebar Footer (Logout) */
.sidebar-footer {
    margin-top: auto;
    padding: 1rem 1.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.875rem;
    margin-bottom: 0.75rem;
}

.sidebar-footer .user-info i {
    font-size: 1.25rem;
}

.sidebar-footer .btn-outline-light {
    border-color: rgba(255, 255, 255, 0.3);
    color: rgba(255, 255, 255, 0.7);
}

.sidebar-footer .btn-outline-light:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.5);
    color: white;
}

/* Main Content Area */
.cms-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    background: #f8f9fa;
}

.cms-header {
    background: white;
    border-bottom: 1px solid var(--border-color);
    padding: 1.5rem 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05);
}

.cms-header h1 {
    font-size: 1.75rem;
    font-weight: 600;
    margin: 0;
    color: #212529;
}

.cms-header p {
    margin: 0.25rem 0 0 0;
}

.cms-content {
    flex: 1;
    overflow-y: auto;
    padding: 2rem;
}

/* Cards */
.site-card {
    background: white;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s ease;
    border: 1px solid var(--border-color);
}

.site-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.site-card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.site-card-header h5 {
    margin: 0;
    font-size: 1.25rem;
    font-weight: 600;
}

.site-card-body {
    padding: 1.5rem;
}

.site-stats {
    display: flex;
    gap: 1.5rem;
    margin-top: 1rem;
    color: var(--text-muted);
    font-size: 0.875rem;
}

.site-stats span {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.site-card-footer {
    padding: 1rem 1.5rem;
    background: #f8f9fa;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
}

/* Section Cards */
.section-card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    border: 1px solid var(--border-color);
    overflow: hidden;
}

.section-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #f8f9fa;
}

.section-header h3 {
    margin: 0;
    font-size: 1.125rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.section-header h5 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
}

.section-body {
    padding: 1.5rem;
}

/* Empty States */
.empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 4rem;
    color: var(--border-color);
    margin-bottom: 1.5rem;
}

.empty-state h3 {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: #495057;
}

.empty-state p {
    margin-bottom: 1.5rem;
}

.empty-state-small {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--text-muted);
}

.empty-state-small i {
    font-size: 2.5rem;
    color: var(--border-color);
    margin-bottom: 1rem;
    display: block;
}

/* Menu Card */
.menu-card {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1.25rem;
}

/* Menu Item Card */
.menu-item-card {
    display: flex;
    align-items: center;
    gap: 1rem;
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 0.75rem;
    transition: all 0.2s;
}

.menu-item-card:hover {
    border-color: var(--primary-color);
    box-shadow: 0 2px 8px rgba(13, 110, 253, 0.1);
}

.menu-item-handle {
    cursor: grab;
    color: var(--text-muted);
    font-size: 1.25rem;
}

.menu-item-handle:active {
    cursor: grabbing;
}

.menu-item-content {
    flex: 1;
}

.menu-item-content strong {
    display: block;
    margin-bottom: 0.25rem;
}

.menu-item-content small {
    display: block;
}

.menu-item-actions {
    display: flex;
    gap: 0.5rem;
}

/* Menu Preview */
.menu-preview {
    background: #f8f9fa;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    padding: 1rem;
    min-height: 200px;
}

/* Widget Items */
.widget-item-small {
    background: white;
    border: 2px dashed var(--border-color);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.75rem;
    cursor: move;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.widget-item-small:hover {
    border-color: var(--primary-color);
    background: #f0f7ff;
}

.widget-item-small i {
    font-size: 1.25rem;
    color: var(--primary-color);
}

/* Footer Builder */
.footer-builder-canvas {
    background: #e9ecef;
    border-radius: 12px;
    padding: 2rem;
    min-height: 400px;
}

.footer-preview {
    background: #343a40;
    color: white;
    border-radius: 8px;
    padding: 2rem;
    min-height: 300px;
}

.footer-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    padding: 3rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
}

.footer-drop-zone i {
    font-size: 3rem;
    margin-bottom: 1rem;
    display: block;
}

/* Tables */
.table-responsive {
    border-radius: 8px;
    overflow: hidden;
}

.table {
    margin: 0;
}

.table thead {
    background: #f8f9fa;
}

.table th {
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.75rem;
    letter-spacing: 0.5px;
    color: var(--text-muted);
    border-bottom: 2px solid var(--border-color);
}

/* Buttons */
.btn {
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-sm {
    padding: 0.375rem 0.75rem;
    font-size: 0.875rem;
}

.btn-primary {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover {
    background: #0b5ed7;
    border-color: #0b5ed7;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(13, 110, 253, 0.3);
}

/* Badges */
.badge {
    padding: 0.375rem 0.75rem;
    font-weight: 500;
    border-radius: 6px;
}

/* Forms */
.form-control,
.form-select {
    border-radius: 8px;
    border: 1px solid var(--border-color);
    padding: 0.625rem 0.875rem;
}

.form-control:focus,
.form-select:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(13, 110, 253, 0.15);
}

/* Modals */
.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-header {
    border-bottom: 1px solid var(--border-color);
    padding: 1.25rem 1.5rem;
}

.modal-title {
    font-weight: 600;
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    border-top: 1px solid var(--border-color);
    padding: 1rem 1.5rem;
}

/* Responsive */
@media (max-width: 768px) {
    .cms-sidebar {
        position: fixed;
        left: -260px;
        z-index: 1000;
        transition: left 0.3s;
    }

    .cms-sidebar.active {
        left: 0;
    }

    .cms-header {
        padding: 1rem;
    }

    .cms-content {
        padding: 1rem;
    }
}

/* Animation */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.site-card,
.section-card {
    animation: fadeIn 0.3s ease;
}
