@import url('responsive.css');

/* Employee Portal Styles */
body {
    margin: 0;
    color: #333;
    background-color: #f5f5f5;
}

.employee-portal {
    max-width: 1200px;
    margin: 50px auto;
    padding: 1rem;
}

/* Login Section */
.login-container {
    background: #fff;
    max-width: 400px;
    margin: 2rem auto;
    padding: 2rem;
    border: 1px solid #ddd;
    border-radius: 4px;
}

.login-container h2 {
    color: #333;
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    text-align: center;
}

.input-group {
    margin-bottom: 1rem;
}

.input-group input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 1rem;
    box-sizing: border-box;
}

.input-group input:focus {
    border-color: #ff0000;
    outline: none;
}

.login-btn {
    background: #ff0000;
    color: #fff;
    border: none;
    padding: 10px 20px;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    width: 100%;
}

.login-btn:hover {
    background: #b30000;
}

/* Portal Content */
.portal-content {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 2rem;
    margin: 1rem 0;
}

.portal-content h1 {
    font-size: 1.8rem;
    color: #333;
    text-align: center;
    margin-bottom: 2rem;
}

.resources-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
}

.resource-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5rem;
}

.resource-card h2 {
    color: #333;
    margin-bottom: 1rem;
    font-size: 1.2rem;
    display: flex;
    align-items: center;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.resource-card h2 i {
    margin-right: 8px;
    font-size: 1.2rem;
}

.resource-card ul {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.resource-card li {
    margin-bottom: 0.5rem;
    padding-left: 1rem;
    position: relative;
}

.resource-card li:before {
    content: "•";
    color: #666;
    position: absolute;
    left: 0;
}

.sub-list {
    margin-top: 0.5rem;
    padding-left: 1rem;
    font-size: 0.9rem;
}

.sub-list li {
    margin-bottom: 0.3rem;
}

.sub-list li:before {
    content: "◦";
    color: #999;
}

.download-link {
    color: #007bff;
    text-decoration: none;
}

.download-link:hover {
    text-decoration: underline;
}

/* Button Styles */
.directions-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #ff0000;
    color: white;
    padding: 8px 16px;
    border-radius: 4px;
    font-weight: 500;
    text-decoration: none;
    border: none;
    cursor: pointer;
    margin-top: 1rem;
    font-size: 1rem;
}

.directions-btn:hover {
    background: #b30000;
}

/* Value Card Styles */
.value-card {
    background: #f8f9fa;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5rem;
    text-align: center;
    margin-bottom: 1rem;
}

.value-card h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.value-card p {
    color: #666;
    font-size: 1rem;
    line-height: 1.5;
    margin: 0;
}

/* ===== CMS STYLES ===== */

/* CMS Container */
.cms-container {
    display: flex;
    min-height: 100vh;
    background: #f5f5f5;
}

.cms-container.cms-loaded {
    opacity: 1;
}

/* Sidebar */
.sidebar {
    width: 250px;
    background: #fff;
    border-right: 1px solid #ddd;
    padding: 1rem 0;
}

.sidebar-header {
    padding: 0 1rem 1rem;
    border-bottom: 1px solid #eee;
    margin-bottom: 1rem;
}

.sidebar-header h2 {
    color: #333;
    font-size: 1.2rem;
    margin: 0 0 0.5rem 0;
    display: flex;
    align-items: center;
}

.sidebar-header h2 i {
    margin-right: 8px;
    color: #666;
}

.sidebar-header p {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

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

.sidebar-nav li {
    margin: 0;
}

.nav-link {
    display: flex;
    align-items: center;
    padding: 12px 1rem;
    color: #333;
    text-decoration: none;
    border: none;
    background: none;
    width: 100%;
    text-align: left;
    cursor: pointer;
}

.nav-link:hover {
    background: #f8f9fa;
}

.nav-link.active {
    background: #ffcccc;
    color: #d21919;
    border-right: 3px solid #ff0000;
}

.nav-link i {
    margin-right: 10px;
    width: 16px;
    text-align: center;
}

.nav-link span {
    font-size: 0.95rem;
}

/* Main Content */
.main-content {
    flex: 1;
    padding: 1rem;
    background: #fff;
}

.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid #eee;
}

.page-info h1 {
    color: #333;
    font-size: 1.5rem;
    margin: 0 0 0.5rem 0;
}

.page-info p {
    color: #666;
    margin: 0;
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    padding: 1.5rem;
    text-align: center;
}

.stat-icon {
    width: 50px;
    height: 50px;
    background: #f8f9fa;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
}

.stat-icon i {
    font-size: 1.5rem;
    color: #666;
}

.stat-number {
    font-size: 2rem;
    font-weight: bold;
    color: #333;
    margin-bottom: 0.5rem;
}

.stat-label {
    color: #666;
    font-size: 0.9rem;
}

/* Recent Content */
.recent-content {
    margin-top: 2rem;
}

.recent-content h3 {
    color: #333;
    font-size: 1.2rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

/* Content Actions */
.content-actions {
    display: flex;
    gap: 1rem;
    margin-bottom: 1rem;
    align-items: center;
}

.search-box {
    position: relative;
    flex: 1;
    max-width: 300px;
}

.search-box i {
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #666;
}

.search-box input {
    width: 100%;
    padding: 8px 10px 8px 35px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.search-box input:focus {
    border-color: #007bff;
    outline: none;
}

.filter-dropdown select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    background: #fff;
}

/* Content List */
.content-list {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-height: 200px;
}

.loading {
    padding: 2rem;
    text-align: center;
    color: #666;
}

.empty-state {
    padding: 3rem 2rem;
    text-align: center;
    color: #666;
}

.empty-state i {
    font-size: 3rem;
    color: #ddd;
    margin-bottom: 1rem;
}

.empty-state p {
    margin: 0;
    font-size: 1rem;
}

/* Buttons */
.btn {
    padding: 8px 16px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    cursor: pointer;
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    background: #fff;
    color: #333;
}

.btn-primary {
    background: #ff0000;
    color: #fff;
    border-color: #ff0000;
}

.btn-primary:hover {
    background: #b30000;
    border-color: #b30000;
}

.btn-secondary {
    background: #6c757d;
    color: #fff;
    border-color: #6c757d;
}

.btn-secondary:hover {
    background: #545b62;
    border-color: #545b62;
}

.btn-danger {
    background: #dc3545;
    color: #fff;
    border-color: #dc3545;
}

.btn-danger:hover {
    background: #c82333;
    border-color: #c82333;
}

/* Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: #fff;
    border-radius: 4px;
    width: 90%;
    max-width: 600px;
    max-height: 90vh;
    overflow-y: auto;
}

.modal-header {
    padding: 1rem;
    border-bottom: 1px solid #ddd;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    color: #333;
    font-size: 1.2rem;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.2rem;
    cursor: pointer;
    color: #666;
    padding: 0;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.modal-close:hover {
    color: #333;
}

.modal-body {
    padding: 1rem;
}

.modal-footer {
    padding: 1rem;
    border-top: 1px solid #ddd;
    display: flex;
    gap: 0.5rem;
    justify-content: flex-end;
}

.delete-modal {
    max-width: 400px;
}

.delete-modal .modal-body p {
    margin: 0;
    color: #666;
    line-height: 1.5;
}

/* Form Styles */
#content-form {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.form-group label {
    font-weight: 500;
    color: #333;
}

.form-group input,
.form-group select {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
}

.form-group input:focus,
.form-group select:focus {
    border-color: #007bff;
    outline: none;
}

.form-group textarea {
    padding: 8px 10px;
    border: 1px solid #ddd;
    border-radius: 4px;
    font-size: 0.9rem;
    min-height: 100px;
    resize: vertical;
}

/* Content Items */
.content-item {
    padding: 1rem;
    border-bottom: 1px solid #eee;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.content-item:last-child {
    border-bottom: none;
}

.content-item:hover {
    background: #f8f9fa;
}

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

.content-item-title {
    font-weight: 500;
    color: #333;
    margin-bottom: 0.25rem;
}

.content-item-meta {
    font-size: 0.85rem;
    color: #666;
}

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

.content-item-actions button {
    padding: 4px 8px;
    font-size: 0.8rem;
}

.status-badge {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    margin-left: 0.5rem;
}

.status-draft {
    background: #fff3cd;
    color: #856404;
}

.status-published {
    background: #d4edda;
    color: #155724;
}

.status-archived {
    background: #f8d7da;
    color: #721c24;
}

/* Page content editor */
.page-editor-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.page-editor-section {
    border: 1px solid #e5e5e5;
    border-radius: 6px;
    padding: 1rem;
    background: #fafafa;
}

.page-editor-section-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.75rem;
}

.page-editor-section h3,
.page-editor-section h4 {
    margin: 0 0 0.75rem 0;
    color: #333;
}

.repeatable-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.repeatable-card {
    background: #fff;
    border: 1px solid #ddd;
    border-radius: 6px;
    padding: 1rem;
}

.repeatable-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #eee;
}

.repeatable-card-actions {
    display: flex;
    gap: 0.35rem;
    flex-wrap: wrap;
}

.form-hint {
    color: #666;
    font-size: 0.9rem;
    margin: 0;
}

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

@media (max-width: 768px) {
    .page-editor-section-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .repeatable-card-header {
        flex-direction: column;
        align-items: flex-start;
    }
}

/* Responsive Design */
@media (max-width: 1024px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        padding: 0.75rem;
    }
}

@media (max-width: 768px) {
    .cms-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid #ddd;
    }
    
    .main-content {
        padding: 0.5rem;
    }
    
    .page-header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }
    
    .content-actions {
        flex-direction: column;
        align-items: stretch;
    }
    
    .search-box {
        max-width: none;
    }
    
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .modal {
        width: 95%;
        margin: 1rem;
    }
}

@media (max-width: 480px) {
    .content-section {
        padding: 0.5rem;
    }
    
    .page-header {
        padding: 0.5rem 0;
    }
    
    .modal-header,
    .modal-body,
    .modal-footer {
        padding: 0.75rem;
    }
    
    .btn {
        padding: 6px 12px;
        font-size: 0.85rem;
    }
}

@media (max-width: 768px) {
    .employee-portal {
        margin: 20px auto;
        padding: 0.5rem;
    }
    
    .login-container, .portal-content {
        padding: 1.5rem;
    }
    
    .resources-grid {
        grid-template-columns: 1fr;
    }
    
    .portal-content h1 {
        font-size: 1.5rem;
    }
    
    .login-container h2 {
        font-size: 1.3rem;
    }
}

@media (max-width: 480px) {
    .login-container, .portal-content {
        padding: 1rem;
    }
    
    .resource-card {
        padding: 1rem;
    }
    
    .portal-content h1 {
        font-size: 1.3rem;
    }
}

.page-content-editor {
    max-width: 900px;
}

.page-editor-form {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 1.5rem;
}

.page-editor-form h3 {
    margin: 1.25rem 0 0.75rem;
    font-size: 1.1rem;
}

.page-editor-form h3:first-child {
    margin-top: 0;
}

.form-hint {
    color: #666;
    font-size: 0.9rem;
    margin: 1rem 0;
}