/* Website CMS Shared Styles - Modernized with Theme System */
/* Note: theme.css must be loaded before this file in HTML */

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

:root {
    /* CMS-specific variables */
    --primary: #0D5C63;
    --primary-dark: #0a4a4f;
    --secondary: #FF9F1C;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-secondary);
    color: var(--text-primary);
    line-height: var(--line-height-normal);
    font-size: var(--font-size-base);
}

.cms-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 2rem;
}

.cms-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--border-light);
}

.cms-header {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.cms-header .cms-logo {
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
}

.cms-header .cms-logo img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.cms-header h1 {
    font-size: 2rem;
    color: var(--school-primary-color, #0D5C63);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-back {
    padding: 0.5rem 1rem;
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    font-weight: var(--font-weight-medium);
    transition: all var(--transition-base);
    border: 1px solid var(--border-light);
}

.btn-back:hover {
    background-color: var(--bg-hover);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

.page-content {
    background-color: var(--bg-primary);
    padding: 2rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.page-list {
    display: grid;
    gap: 1rem;
}

.page-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem;
    background-color: var(--bg-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius);
    transition: all var(--transition-base);
}

.page-item:hover {
    border-color: var(--school-primary-color, var(--primary));
    box-shadow: var(--shadow-md);
    background-color: var(--bg-primary);
    transform: translateX(4px);
}

.page-info h3 {
    color: var(--text-primary);
    margin-bottom: 0.25rem;
}

.page-info p {
    color: var(--text-muted);
    font-size: var(--font-size-sm);
}

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

.btn-edit, .btn-view {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-weight: 500;
    transition: all 0.2s;
}

.btn-edit {
    background: var(--school-primary-color, var(--primary));
    color: var(--bg-primary);
}

.btn-edit:hover:not(:disabled) {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.btn-view {
    background-color: var(--bg-tertiary);
    color: var(--text-secondary);
    border: 1px solid var(--border-light);
}

.btn-view:hover:not(:disabled) {
    background-color: var(--bg-hover);
    border-color: var(--border-medium);
    color: var(--text-primary);
}

/* Responsive */
@media (max-width: 768px) {
        .page-item {
            flex-direction: column;
            align-items: flex-start;
            gap: 1rem;
        }

        .page-actions {
            width: 100%;
            justify-content: flex-end;
        }
    }

/* Modern Enhancements */

.stat-card {
    transition: all var(--transition-base);
    border-left: 4px solid var(--primary);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.page-item {
    transition: all var(--transition-base);
}

.page-item:hover {
    box-shadow: var(--shadow-md);
    transform: translateX(4px);
}

.action-btn {
    transition: all var(--transition-base);
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

/* Form Improvements */
input, select, textarea {
    transition: all var(--transition-base);
    border: 1.5px solid var(--border-light);
    border-radius: var(--radius);
    padding: 0.75rem 1rem;
    background-color: var(--bg-primary);
    color: var(--text-primary);
}

input:focus, select:focus, textarea:focus {
    outline: none;
    border-color: var(--school-primary-color, var(--primary));
    box-shadow: 0 0 0 3px color-mix(in srgb, var(--school-primary-color, var(--primary)) 15%, transparent);
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    max-width: 400px;
}

.toast {
    padding: 1rem 1.25rem;
    background-color: var(--bg-primary);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 0.75rem;
    animation: slideInRight 0.3s ease-out;
    border-left: 4px solid var(--school-primary-color, var(--primary));
    border: 1px solid var(--border-light);
    border-left-width: 4px;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* Improved Typography */
h1, h2, h3 {
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    letter-spacing: -0.02em;
}

h2 {
    letter-spacing: -0.01em;
}

