/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    background-color: #f5f6fa;
    color: #2d3436;
}

/* Authentication Pages */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: #f5f6fa;
}

.auth-box {
    background: white;
    padding: 2rem;
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 400px;
}

.auth-box h1 {
    text-align: center;
    color: #2d3436;
    margin-bottom: 2rem;
}

.auth-form .form-group {
    margin-bottom: 1.5rem;
}

.auth-form label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d3436;
}

.auth-form input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid #dfe6e9;
    border-radius: 4px;
    font-size: 1rem;
}

.auth-form input:focus {
    border-color: #6c5ce7;
    outline: none;
}

.auth-form .error-message {
    color: #e74c3c;
    font-size: 0.875rem;
    margin-top: 0.25rem;
    min-height: 0;
    display: none;
}

.auth-form .error-message:not(:empty) {
    display: block;
    min-height: 1.25rem;
}

.auth-form .general-error {
    text-align: center;
    margin: 1rem 0;
    padding: 0.5rem;
    background-color: #fde8e8;
    border: 1px solid #fbd5d5;
    border-radius: 4px;
    font-weight: 500;
    display: none;
}

.auth-form .general-error:not(:empty) {
    display: block;
}

.auth-form input.error {
    border-color: #e74c3c;
}

.auth-form button {
    width: 100%;
    padding: 0.75rem;
    background: #6c5ce7;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background 0.3s ease;
}

.auth-form button:hover {
    background: #5f4dd0;
}

.auth-link {
    text-align: center;
    margin-top: 1.5rem;
}

.auth-link a {
    color: #6c5ce7;
    text-decoration: none;
}

.auth-link a:hover {
    text-decoration: underline;
}

/* Dashboard Styles */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background-color: #2d3436;
    color: white;
    padding: 1rem;
}

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

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li {
    margin-bottom: 0.5rem;
}

.sidebar-menu a {
    color: white;
    text-decoration: none;
    display: flex;
    align-items: center;
    padding: 0.8rem;
    border-radius: 5px;
    transition: all 0.3s ease;
}

.sidebar-menu a i {
    margin-right: 0.8rem;
}

.sidebar-menu li.active a,
.sidebar-menu a:hover {
    background-color: #6c5ce7;
}

.main-content {
    flex: 1;
    padding: 1rem;
}

.top-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background-color: white;
    border-radius: 10px;
    margin-bottom: 2rem;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
}

.search-bar {
    display: flex;
    align-items: center;
}

.search-bar input {
    padding: 0.5rem;
    border: 1px solid #dfe6e9;
    border-radius: 5px;
    margin-right: 0.5rem;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.user-info #userName {
    font-weight: 500;
    color: #2d3436;
    font-size: 1.1rem;
}

.profile-pic {
    width: 40px;
    height: 40px;
    border-radius: 50%;
}

.content-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.content-filters {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.content-filters select {
    padding: 0.5rem;
    border: 1px solid #dfe6e9;
    border-radius: 5px;
}

.content-table {
    background-color: white;
    border-radius: 10px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.05);
    overflow: hidden;
}

table {
    width: 100%;
    border-collapse: collapse;
}

th, td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #dfe6e9;
}

th {
    background-color: #f8f9fa;
    font-weight: 600;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    overflow-y: auto;
}

.modal-content {
    background-color: white;
    margin: 2% auto;
    padding: 2.5rem;
    border-radius: 12px;
    width: 90%;
    max-width: 700px;
    position: relative;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.modal-content h2 {
    color: #2d3436;
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 2px solid #f0f0f0;
}

.close {
    position: absolute;
    right: 1.5rem;
    top: 1.5rem;
    font-size: 1.5rem;
    cursor: pointer;
    color: #666;
    transition: color 0.3s ease;
    width: 30px;
    height: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
}

.close:hover {
    color: #333;
    background-color: #f0f0f0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    color: #2d3436;
    font-weight: 500;
    font-size: 0.95rem;
}

.form-group input[type="text"],
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid #dfe6e9;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #f8f9fa;
}

.form-group input[type="text"]:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #6c5ce7;
    background-color: white;
    box-shadow: 0 0 0 3px rgba(108, 92, 231, 0.1);
}

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

.form-group input[type="file"] {
    width: 100%;
    padding: 0.8rem;
    border: 2px dashed #dfe6e9;
    border-radius: 8px;
    background-color: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

.form-group input[type="file"]:hover {
    border-color: #6c5ce7;
    background-color: #f0f0f0;
}

.form-actions {
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    margin-top: 2rem;
    padding-top: 1.5rem;
    border-top: 2px solid #f0f0f0;
}

.btn {
    display: inline-block;
    padding: 0.8rem 1.5rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 500;
    transition: all 0.3s ease;
    text-align: center;
    min-width: 120px;
}

.btn-primary {
    background-color: #6c5ce7;
    color: white;
}

.btn-primary:hover {
    background-color: #5f4dd0;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(108, 92, 231, 0.2);
}

.btn-secondary {
    background-color: #f0f0f0;
    color: #2d3436;
}

.btn-secondary:hover {
    background-color: #e0e0e0;
    transform: translateY(-1px);
}

/* User Modal Specific Styles */
#userModal .modal-content {
    max-width: 500px;
    padding: 0;
}

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

#userModal .modal-header h2 {
    margin: 0;
    padding: 0;
    border: none;
    font-size: 1.5rem;
}

#userModal .close {
    position: static;
    color: #636e72;
    font-size: 1.5rem;
    font-weight: bold;
    cursor: pointer;
    transition: color 0.2s;
}

#userModal .close:hover {
    color: #2d3436;
    background: none;
}

#userForm {
    padding: 1.5rem;
}

#userForm .form-group label i {
    margin-right: 0.5rem;
    color: #6c5ce7;
}

#userForm .form-group input {
    padding: 0.75rem;
    border-radius: 4px;
    transition: border-color 0.2s, box-shadow 0.2s;
}

#userForm .form-group input:focus {
    outline: none;
    border-color: #6c5ce7;
    box-shadow: 0 0 0 2px rgba(108, 92, 231, 0.1);
}

#userForm .form-group input::placeholder {
    color: #b2bec3;
}

#userForm .btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: 4px;
}

#userForm .btn i {
    font-size: 1rem;
}

/* Responsive Design */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
    }

    .content-header {
        flex-direction: column;
        gap: 1rem;
    }

    .content-filters {
        flex-direction: column;
    }

    .modal-content {
        margin: 5% auto;
        padding: 1.5rem;
        width: 95%;
    }

    .form-actions {
        flex-direction: column;
    }

    .btn {
        width: 100%;
    }
}

/* View Content Modal Styles */
.view-content {
    padding: 20px 0;
}

.view-content h3 {
    margin: 0 0 10px 0;
    font-size: 24px;
    color: #333;
}

.content-meta {
    color: #666;
    margin-bottom: 20px;
    font-size: 14px;
}

.content-image {
    margin-bottom: 20px;
    text-align: center;
}

.content-image img {
    max-width: 100%;
    max-height: 400px;
    border-radius: 4px;
}

.content-body {
    line-height: 1.6;
    color: #333;
    white-space: pre-wrap;
}

/* Action buttons spacing */
.btn + .btn {
    margin-left: 8px;
}

/* Existing Image Preview Styles */
.existing-image {
    margin-bottom: 1rem;
    padding: 1rem;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #dfe6e9;
}

.existing-image p {
    margin: 0 0 0.5rem 0;
    color: #2d3436;
    font-weight: 500;
}

.existing-image img {
    display: block;
    border-radius: 4px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.image-note {
    margin-top: 0.5rem !important;
    font-size: 0.875rem;
    color: #636e72 !important;
    font-weight: normal !important;
} 