/* Admin Panel Styles */
#admin-panel {
    padding: 2rem;
    background: var(--bg-color);
    min-height: calc(100vh - 180px);
    margin-bottom: 60px;
}

.admin-login {
    max-width: 450px;
    margin: 3rem auto;
    padding: 2.5rem;
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 5px 20px var(--card-shadow);
}

.admin-login h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: var(--header-bg);
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #495057;
}

.form-group input[type="text"],
.form-group input[type="password"],
.form-group select,
.form-group input[type="file"] {
    width: 100%;
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    font-size: 1rem;
    transition: border-color var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    background-color: #fff;
    box-sizing: border-box;
}

.form-group input[type="file"]::file-selector-button {
    padding: 0.6rem 1rem;
    margin-right: 1rem;
    margin-left: -1rem;
    margin-top: -0.8rem;
    margin-bottom: -0.8rem;
    border: none;
    background-color: var(--primary-accent);
    color: white;
    border-radius: var(--border-radius) 0 0 var(--border-radius);
    cursor: pointer;
    transition: background-color var(--transition-speed);
    height: calc(1.6rem + 1.6rem);
    line-height: 1.6rem;
}

.form-group input[type="file"]::file-selector-button:hover {
    background-color: #2980b9;
}

.form-group input[type="text"]:focus,
.form-group input[type="password"]:focus,
.form-group select:focus {
    border-color: var(--primary-accent);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.2);
    outline: none;
}

#login-form button {
    width: 100%;
    padding: 0.8rem;
    font-size: 1.1rem;
    margin-top: 1rem;
}

.admin-dashboard {
    max-width: 1400px;
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    flex-wrap: wrap;
    gap: 1rem;
}

.dashboard-header h2 {
    margin: 0;
}

.dashboard-actions {
    display: flex;
    gap: 0.8rem;
    flex-wrap: wrap;
}

.folder-navigation {
    margin-bottom: 1.5rem;
}

#breadcrumbs {
    list-style: none;
    display: flex;
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
    background: #e9ecef;
    border-radius: var(--border-radius);
    font-size: 0.9rem;
    margin: 0;
}

#breadcrumbs li {
    margin-right: 0.5rem;
    color: #6c757d;
}

#breadcrumbs li:not(:last-child)::after {
    content: "/";
    margin-left: 0.5rem;
    color: #adb5bd;
}

#breadcrumbs a {
    color: var(--primary-accent);
    font-weight: 500;
    text-decoration: none;
}

#breadcrumbs a:hover {
    text-decoration: underline;
}

.file-explorer {
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

.file-explorer h3 {
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-accent);
    display: inline-block;
    font-size: 1.4rem;
    color: var(--header-bg);
}

.folders-container {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 1.5rem;
}

.folder-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    background: var(--card-bg);
    padding: 1.5rem 1rem;
    border-radius: var(--border-radius);
    box-shadow: 0 2px 5px var(--card-shadow);
    cursor: pointer;
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    text-align: center;
}

.folder-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.folder-icon {
    font-size: 3.5rem;
    color: var(--secondary-accent);
    margin-bottom: 0.8rem;
}

.folder-name {
    font-weight: 600;
    word-break: break-word;
    margin-bottom: 0.5rem;
    color: var(--text-color);
    font-size: 1rem;
}

.folder-info p.file-count {
    font-size: 0.85rem;
    color: #6c757d;
    margin: 0.3rem 0;
    display: flex; /* Align icon and text */
    align-items: center;
    justify-content: center; /* Center horizontally */
    gap: 0.5rem; /* Space between icon and text */
    line-height: 1.2; /* Adjust vertical alignment if needed */
}

.folder-info p.file-count::before {
    content: "📄"; /* Document emoji */
    font-size: 1em; /* Match text size */
    color: #6c757d; /* Match text color */
    /* No need for display: inline-block if using flex */
}

/* Adjust other icons if needed for consistency */
.views::before { content: "👁️"; font-size: 1em; color: var(--primary-accent); }
.file-downloads::before, .downloads::before { content: "⬇️"; font-size: 1em; color: var(--danger-color); }
.folder-downloads::before { content: "📂"; font-size: 1em; color: var(--success-color); }
.size::before { content: "💾"; font-size: 1em; color: #6c757d; }
.type::before { content: "❓"; font-size: 1em; color: #6c757d; }

.folder-actions, .file-actions {
    display: flex;
    gap: 0.5rem;
    margin-top: 1rem;
    text-align: center;
}

.folder-action-btn, .file-action-btn {
    padding: 0.4rem 0.8rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    border: none;
    cursor: pointer;
    transition: all var(--transition-speed) ease;
}

.folder-action-btn i, .file-action-btn i {
    font-style: normal;
    font-size: 1rem;
    line-height: 1;
}

.share-btn { background-color: var(--success-color); color: white; }
.share-btn:hover { background-color: #27ae60; transform: scale(1.05); }

.delete-btn { background-color: var(--danger-color); color: white; }
.delete-btn:hover { background-color: #c0392b; transform: scale(1.05); }

.download-btn { background-color: var(--primary-accent); color: white; }
.download-btn:hover { background-color: #2980b9; transform: scale(1.05); }
/* --- START: File Grid Layout --- */

.files-container {
    display: grid; /* Use Grid layout */
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); /* Responsive columns */
    gap: 1.5rem; /* Spacing between items */
    margin-top: 2rem; /* Space above the file grid */
    padding-bottom: 1rem; /* Space at the bottom */
}

.file-item {
    background: var(--card-bg);
    border-radius: var(--border-radius);
    box-shadow: 0 3px 8px var(--card-shadow);
    padding: 1rem;
    display: flex; /* Use flex for internal layout */
    flex-direction: column; /* Stack preview and info vertically */
    text-align: center; /* Center align text content */
    transition: transform var(--transition-speed) ease, box-shadow var(--transition-speed) ease;
    overflow: hidden; /* Prevent content overflow */
}

.file-item:hover {
    transform: translateY(-4px);
    box-shadow: 0 6px 15px rgba(0, 0, 0, 0.1);
}

.file-preview {
    height: 150px; /* Fixed height for preview area */
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #f0f4f8; /* Light background for placeholder/docs */
    border-radius: var(--border-radius);
    overflow: hidden; /* Ensure content fits */
    position: relative; /* For potential overlays or icons */
}

.file-preview img,
.file-preview video {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover; /* Cover the area, cropping if needed */
}

/* Style for non-image/video previews (e.g., document icon) */
.file-preview.document .document-icon {
    font-size: 4rem; /* Make document icon larger */
    color: var(--secondary-accent);
}

.file-info {
    /* Flexbox handled alignment in .file-item */
}

.file-name {
    font-weight: 600;
    margin-bottom: 0.6rem;
    word-break: break-word; /* Wrap long filenames */
    font-size: 0.95rem;
    color: var(--header-bg);
    /* Optional: Limit lines and add ellipsis for very long names */
    /* display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    min-height: 2.4em; */ /* Adjust based on line-height */
}

.file-info p {
    font-size: 0.8rem; /* Slightly smaller info text */
    color: #6c757d;
    margin: 0.25rem 0; /* Tighter spacing for info lines */
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.4rem;
    line-height: 1.3;
}

/* Ensure icons align well */
.file-info p::before {
    font-size: 0.9em;
    line-height: 1;
}

.file-actions {
    display: flex;
    justify-content: center; /* Center buttons */
    gap: 0.8rem; /* Space between buttons */
    margin-top: 1rem;
}

/* Adjust button size if needed for grid */
.file-action-btn {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* --- END: File Grid Layout --- */
.modal {
    display: none;
    position: fixed;
    z-index: 1050;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    overflow: auto;
    animation: modalBackdropFadeIn 0.3s ease;
}

@keyframes modalBackdropFadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.modal-content {
    background-color: var(--card-bg);
    margin: 8% auto;
    padding: 0;
    border-radius: var(--border-radius);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    width: 90%;
    max-width: 650px;
    animation: modalContentSlideDown 0.4s ease-out;
}

@keyframes modalContentSlideDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

.modal-header {
    padding: 1.2rem 1.5rem;
    background: #f8f9fa;
    border-bottom: 1px solid var(--border-color);
    border-radius: var(--border-radius) var(--border-radius) 0 0;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h3 {
    margin: 0;
    font-size: 1.3rem;
    color: var(--header-bg);
}

.close-modal {
    font-size: 1.8rem;
    font-weight: bold;
    cursor: pointer;
    color: #adb5bd;
    transition: color var(--transition-speed) ease;
    line-height: 1;
}

.close-modal:hover {
    color: var(--danger-color);
}

.modal-body {
    padding: 1.5rem;
}

.upload-preview {
    margin-top: 1rem;
    margin-bottom: 1.5rem;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(80px, 1fr));
    gap: 0.8rem;
	max-height: 300px; /* Or desired height (e.g., 40vh) */
    overflow-y: auto;  /* Enable vertical scrollbar when content exceeds max-height */
    border: 1px solid var(--border-color, #ccc); /* Optional: Add border */
    padding: 10px; /* Optional: Add padding inside */
    background-color: #f8f9fa;
}

.preview-item {
    position: relative;
    height: 80px;
    background: #e9ecef;
    border-radius: 4px;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--border-color);
}

.preview-item img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.preview-name {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    font-size: 0.7rem;
    padding: 0.3rem;
    text-align: center;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
    margin-bottom: 1rem;
}

.checkbox-group input[type="checkbox"] {
    width: auto;
    margin-right: 0.5rem;
    accent-color: var(--primary-accent);
}

.checkbox-group label {
    font-size: 0.95rem;
    color: #495057;
}

.share-result {
    margin-top: 1.5rem;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border-color);
}

.link-container {
    display: flex;
    gap: 0.5rem;
    align-items: center;
}

.link-container input {
    flex-grow: 1;
    background-color: #e9ecef;
}

.secondary-btn-sm {
    padding: 0.4rem 0.8rem;
    font-size: 0.9rem;
    background-color: var(--secondary-accent);
    color: var(--text-color);
    border: none;
    border-radius: var(--border-radius);
}

.secondary-btn-sm:hover {
    background-color: #f39c12;
}

#share-expires {
    font-size: 0.9rem;
    color: #6c757d;
    margin-top: 0.5rem;
}

.update-duration-container {
    margin-top: 1rem;
    display: flex;
    gap: 0.8rem;
    align-items: center;
}

.progress-container {
    margin-top: 1rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 1rem;
}

.progress-bar-outer {
    flex-grow: 1;
    height: 12px;
    background-color: #e9ecef;
    border-radius: 10px;
    overflow: hidden;
}

.progress-bar-inner {
    height: 100%;
    width: 0%;
    background-color: var(--success-color);
    border-radius: 10px;
    transition: width 0.2s ease-out;
}

.progress-text {
    font-weight: 600;
    color: var(--text-color);
    min-width: 45px;
    text-align: right;
    font-size: 0.9rem;
}

#analytics-content table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.9rem;
    box-shadow: 0 2px 5px var(--card-shadow);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#analytics-content th, #analytics-content td {
    padding: 0.8rem 1rem;
    border: 1px solid var(--border-color);
    text-align: left;
    vertical-align: top;
}

#analytics-content th {
    background: #f1f3f5;
    font-weight: 600;
    color: var(--header-bg);
}

#analytics-content td {
    word-break: break-word;
    background-color: var(--card-bg);
}

#analytics-content tr:nth-child(even) td {
    background-color: #f8f9fa;
}

#analytics-content .file-list {
    margin-top: 0.5rem;
    font-size: 0.85rem;
    color: #6c757d;
    max-height: 100px;
    overflow-y: auto;
    padding-left: 0.5rem;
    border-left: 3px solid var(--border-color);
    list-style-type: none;
}

#analytics-content .file-list li {
    margin-bottom: 0.2rem;
}

/* --- Styling for User Nav on Canvas Pages (Below Main Nav) --- */

/* Container for the user nav links (dynamically added by navbar-loader.js) */
#user-nav-placeholder {
    display: flex;              /* Use flexbox */
    justify-content: flex-end;  /* Align the inner ul to the right */
    padding: 0.5rem 1.5rem;     /* Add some padding */
    margin-top: 0.5rem;         /* Space below main navbar */
    /* background-color: #eee; */ /* Optional background for debugging */
    /* border-bottom: 1px solid var(--border-color); */ /* Optional separator */
}

/* Style the ul inside the placeholder */
#user-nav-placeholder ul.user-nav-links {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Style links within the user nav */
#user-nav-placeholder ul.user-nav-links a {
    display: inline-block;
    padding: 0.5rem 1rem; /* Make them more button-like */
    border: 1px solid var(--primary-accent);
    color: var(--primary-accent);
    background-color: white; /* White background */
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-speed);
    white-space: nowrap;
}

#user-nav-placeholder ul.user-nav-links a:hover {
    background-color: var(--primary-accent);
    color: white;
    text-decoration: none;
}

/* Style the logout button */
#user-nav-placeholder ul.user-nav-links button#nav-logout-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem; /* Match link padding */
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem; /* Match link font size */
    transition: all var(--transition-speed);
    white-space: nowrap;
}

#user-nav-placeholder ul.user-nav-links button#nav-logout-btn:hover {
    background: #c0392b; /* Darker danger color */
}

/* Style the email span */
#user-nav-placeholder ul.user-nav-links span#nav-user-email {
    color: var(--text-color); /* Use standard text color */
    margin-right: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    align-self: center; /* Vertically align with buttons */
}

/* --- End User Nav Styling --- */

/* --- Styling for User Nav on Canvas Pages (Below Main Nav) --- */

/* Container for the user nav links (dynamically added by navbar-loader.js) */
#user-nav-placeholder {
    display: flex;              /* Use flexbox */
    justify-content: flex-end;  /* Align the inner ul to the right */
    padding: 0.5rem 1.5rem;     /* Add some padding */
    margin-top: 0.5rem;         /* Space below main navbar */
    /* background-color: #eee; */ /* Optional background for debugging */
}

/* Style the ul inside the placeholder */
#user-nav-placeholder ul.user-nav-links {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Style links within the user nav */
#user-nav-placeholder ul.user-nav-links a {
    display: inline-block;
    padding: 0.5rem 1rem; /* Make them more button-like */
    border: 1px solid var(--primary-accent);
    color: var(--primary-accent);
    background-color: white; /* White background */
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-speed);
    white-space: nowrap;
}

#user-nav-placeholder ul.user-nav-links a:hover {
    background-color: var(--primary-accent);
    color: white;
    text-decoration: none;
}

/* Style the logout button */
#user-nav-placeholder ul.user-nav-links button#nav-logout-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem; /* Match link padding */
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem; /* Match link font size */
    transition: all var(--transition-speed);
    white-space: nowrap;
}

#user-nav-placeholder ul.user-nav-links button#nav-logout-btn:hover {
    background: #c0392b; /* Darker danger color */
}

/* Style the email span */
#user-nav-placeholder ul.user-nav-links span#nav-user-email {
    color: var(--text-color); /* Use standard text color */
    margin-right: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    align-self: center; /* Vertically align with buttons */
}

/* --- End User Nav Styling --- */
/* Container for the user nav links (dynamically added by navbar-loader.js) */
#user-nav-placeholder {
    display: flex;              /* Use flexbox */
    justify-content: flex-end;  /* Align the inner ul to the right */
    padding: 0.5rem 1.5rem;     /* Add some padding */
    margin-top: 0.5rem;         /* Space below main navbar */
    /* background-color: #eee; */ /* Optional background for debugging */
}

/* Style the ul inside the placeholder */
#user-nav-placeholder ul.user-nav-links {
    display: flex;
    align-items: center;
    gap: 0.8rem;
    list-style: none;
    padding: 0;
    margin: 0;
}

/* Style links within the user nav */
#user-nav-placeholder ul.user-nav-links a {
    display: inline-block;
    padding: 0.5rem 1rem; /* Make them more button-like */
    border: 1px solid var(--primary-accent);
    color: var(--primary-accent);
    background-color: white; /* White background */
    border-radius: var(--border-radius);
    text-decoration: none;
    font-size: 0.9rem;
    transition: all var(--transition-speed);
    white-space: nowrap;
}

#user-nav-placeholder ul.user-nav-links a:hover {
    background-color: var(--primary-accent);
    color: white;
    text-decoration: none;
}

/* Style the logout button */
#user-nav-placeholder ul.user-nav-links button#nav-logout-btn {
    background: var(--danger-color);
    color: white;
    border: none;
    padding: 0.5rem 1rem; /* Match link padding */
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 0.9rem; /* Match link font size */
    transition: all var(--transition-speed);
    white-space: nowrap;
}

#user-nav-placeholder ul.user-nav-links button#nav-logout-btn:hover {
    background: #c0392b; /* Darker danger color */
}

/* Style the email span */
#user-nav-placeholder ul.user-nav-links span#nav-user-email {
    color: var(--text-color); /* Use standard text color */
    margin-right: 0.5rem;
    font-size: 0.9rem;
    white-space: nowrap;
    align-self: center; /* Vertically align with buttons */
}
/* --- START: Order Table Spacing Adjustments --- */

#orders-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    /* ADD space below the table */
    margin-bottom: 2rem;
    font-size: 0.95rem; /* Slightly larger base font for readability */
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07); /* Optional: subtle shadow */
    border-radius: var(--border-radius); /* Optional: rounded corners for the table */
    overflow: hidden; /* Needed if using border-radius */
}

#orders-table th,
#orders-table td {
    border: 1px solid var(--border-color);
    /* INCREASE padding for more internal space */
    padding: 0.9rem 1.2rem; /* Was likely 0.8rem 1rem */
    text-align: left;
    /* ADD vertical alignment */
    vertical-align: middle;
}

#orders-table th {
    background-color: #f8f9fa; /* Lighter header background */
    color: var(--header-bg); /* Darker text for header */
    font-weight: 600; /* Make headers bolder */
    white-space: nowrap; /* Prevent headers from wrapping */
}

/* Optional: Add minimum widths to specific columns */
#orders-table th:nth-child(3), /* Customer Email */
#orders-table td:nth-child(3) {
    min-width: 200px; /* Give email column more space */
    word-break: break-word; /* Allow long emails to wrap */
}

#orders-table th:nth-child(2), /* Date */
#orders-table td:nth-child(2) {
    min-width: 160px; /* Give date column more space */
    white-space: nowrap; /* Prevent date wrapping */
}

#orders-table th:nth-child(7), /* Actions */
#orders-table td:nth-child(7) {
    text-align: center; /* Center the action button */
}


#orders-table tbody tr:nth-child(even) {
    background-color: #fdfdfd; /* Very light gray for alternate rows */
}
#orders-table tbody tr:hover {
    background-color: #e9ecef; /* Highlight row on hover */
}

/* Adjust button padding within the table if needed */
#orders-table .secondary-btn-sm {
    padding: 0.5rem 0.9rem; /* Slightly more padding */
    font-size: 0.85rem;
}

/* --- END: Order Table Spacing Adjustments --- */
/* --- START: Pagination Styles --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
    gap: 0.5rem; /* Space between buttons/text */
}

.pagination-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--primary-accent);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 0.9rem;
}

.pagination-button:hover:not(:disabled) {
    background-color: var(--primary-accent);
    color: white;
    border-color: var(--primary-accent);
}

.pagination-button:disabled {
    color: #aaa;
    background-color: #eee;
    border-color: #ddd;
    cursor: not-allowed;
}

.page-info {
    padding: 0 0.5rem;
    font-size: 0.95rem;
    color: #555;
}

/* --- END: Pagination Styles --- */
.primary-btn-sm {
     padding: 0.4rem 0.8rem;
     font-size: 0.85rem;
     background-color: var(--primary-accent);
     color: white;  /* Ensure text is white */
     border: none;
     border-radius: var(--border-radius-sm, 4px);
     cursor: pointer;
     transition: background-color 0.2s;
     text-decoration: none; /* Important for <a> tags */
     display: inline-block;
     text-align: center;
     line-height: 1.4; /* Adjust line height if needed */
     vertical-align: middle;
}
 .primary-btn-sm:hover {
     background-color: #2980b9;
     text-decoration: none;
     color: white !important;
 }

/* Style for low-resolution warning in canvas preview */
.preview-warning.low-res-warning {
    color: var(--danger-color, #e74c3c); /* Use danger color for warning */
    font-weight: 500; /* Make it slightly bolder */
    background-color: #fbeae5; /* Lighter red background */
    border-color: #f5c6cb; /* Reddish border */
}

/* --- START: Contact Messages Table Styles --- */

#contact-messages-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 2rem;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#contact-messages-table th,
#contact-messages-table td {
    border: 1px solid var(--border-color);
    padding: 0.9rem 1.2rem;
    text-align: left;
    vertical-align: top; /* Align top for potentially long messages */
}

#contact-messages-table th {
    background-color: #f8f9fa;
    color: var(--header-bg);
    font-weight: 600;
    white-space: nowrap;
}

#contact-messages-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

#contact-messages-table tbody tr:hover {
    background-color: #e9ecef;
}

/* Specific column widths/styles */
#contact-messages-table th:nth-child(1), /* Received */
#contact-messages-table td:nth-child(1) {
    min-width: 160px;
    white-space: nowrap;
}

#contact-messages-table th:nth-child(2), /* Name */
#contact-messages-table td:nth-child(2) {
    min-width: 150px;
    white-space: nowrap;
}

#contact-messages-table th:nth-child(3), /* Email */
#contact-messages-table td:nth-child(3) {
    min-width: 200px;
    word-break: break-all; /* Allow long emails to break */
}

#contact-messages-table th:nth-child(4), /* Message */
#contact-messages-table td:nth-child(4) {
    min-width: 300px; /* Give message more space */
    line-height: 1.4; /* Improve readability */
}

/* Style for the message cell itself if needed */
.message-text-cell {
    /* Optional: Limit height and add scroll if messages are very long */
    /* max-height: 150px; */
    /* overflow-y: auto; */
}

/* Optional: Style for unread messages */
/*
#contact-messages-table tr.unread-message td {
    font-weight: bold;
}
*/

/* --- END: Contact Messages Table Styles --- */

/* --- START: Notification Badge Styles --- */
/* Container for label + badge */
.notification-group {
    display: inline-flex; /* Align label and badge horizontally */
    align-items: center;  /* Vertically center label and badge */
    margin-left: 0.8rem; /* Space from previous button or group */
    padding: 0.3rem 0.6rem; /* Optional padding around the group */
    background-color: #e9ecef; /* Optional subtle background */
    border-radius: var(--border-radius, 8px); /* Match other elements */
    vertical-align: middle; /* Align group with buttons */
    /* Start hidden, JS will show */
    display: none;
}

/* Style for the text label */
.badge-label {
    font-size: 0.85rem; /* Slightly smaller than button text */
    color: #495057;   /* Dark gray color */
    margin-right: 0.4rem; /* Space between label and badge */
    font-weight: 500;
}

/* Adjusted Badge Style */
.notification-badge {
    /* REMOVE margin-left: 0.5rem; */ /* Group handles spacing now */
    display: inline-block;
    min-width: 20px; /* Slightly smaller min-width might look better */
    height: 20px;
    padding: 0 5px;
    font-size: 0.75rem;
    font-weight: bold;
    line-height: 20px;
    color: white;
    text-align: center;
    border-radius: 10px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.15);
    cursor: default;
    /* vertical-align: middle; */ /* Not needed with flex align-items */
}

/* Specific Badge Colors (Keep these) */
#contact-unread-badge {
    background-color: var(--danger-color, #e74c3c); /* Red for messages */
}
.notification-badge.print-ready {
    background-color: var(--success-color, #2ecc71); /* Green for print ready */
}
.notification-badge.design-pending {
    background-color: var(--warning-color, #f39c12); /* Orange/Yellow for design/changes */
}

/* Default Contact Badge Color */
#contact-unread-badge {
    background-color: var(--danger-color, #e74c3c); /* Red for messages */
}

/* Album Badge Specific Colors */
.notification-badge.print-ready {
    background-color: var(--success-color, #2ecc71); /* Green for print ready */
}

.notification-badge.design-pending {
    background-color: var(--warning-color, #f39c12); /* Orange/Yellow for design/changes */
    /* Define --warning-color in :root if not already defined */
}

/* Ensure badges don't overlap excessively if both visible */
#album-print-badge + #album-design-badge {
    margin-left: 0.3rem; /* Slightly reduce space between the two album badges */
}
/* --- END: Notification Badge Styles --- */

/* --- START: Unread Message Style --- */
#contact-messages-table tr.unread-message td {
    font-weight: bold; /* Make text bold for unread messages */
    /* Optional: Add a subtle background or border */
    /* background-color: #fff9e6; */
}
/* --- END: Unread Message Style --- */

/* --- START: Admin Albums Table Styles --- */

#albums-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 2rem; /* Add space below */
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#albums-table th,
#albums-table td {
    border: 1px solid var(--border-color);
    padding: 0.9rem 1.2rem; /* Increased padding */
    text-align: left;
    vertical-align: middle; /* Align content vertically */
}

#albums-table th {
    background-color: #f8f9fa;
    color: var(--header-bg);
    font-weight: 600;
    white-space: nowrap; /* Prevent headers wrapping */
}

#albums-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

#albums-table tbody tr:hover {
    background-color: #e9ecef;
}

/* Specific column widths/styles */
#albums-table th:nth-child(1), /* Album ID */
#albums-table td:nth-child(1) {
    width: 80px; /* Fixed width for ID */
    text-align: center;
}

#albums-table th:nth-child(2), /* Name */
#albums-table td:nth-child(2) {
    min-width: 200px; /* More space for name */
}

#albums-table th:nth-child(3), /* User Email */
#albums-table td:nth-child(3) {
    min-width: 220px; /* More space for email */
    word-break: break-word;
}

#albums-table th:nth-child(4), /* Status */
#albums-table td:nth-child(4) {
    min-width: 180px; /* More space for status */
    white-space: nowrap;
}
#albums-table td:nth-child(4) span { /* Style the status span */
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}
/* Add specific status colors (match album creator if possible) */
.status-draft { background-color: #e9ecef; color: #495057; }
.status-admin-design-pending { background-color: #fff3cd; color: #664d03; }
.status-client-review-pending { background-color: #f8d7da; color: #721c24; } /* Example: Light red */
.status-changes-requested { background-color: #fff3cd; color: #664d03; border: 1px dashed #ffc107; } /* Example: Yellow with dashed border */
.status-submitted { background-color: #cfe2ff; color: #0a58ca; } /* Example: Light blue */
.status-ordered { background-color: #d1e7dd; color: #0f5132; } /* Example: Light green for ordered */
.status-completed { background-color: #d4edda; color: #155724; } /* Darker green for completed */
.status-unknown { background-color: #f8d7da; color: #842029; }


#albums-table th:nth-child(5), /* Created */
#albums-table td:nth-child(5),
#albums-table th:nth-child(6), /* Updated */
#albums-table td:nth-child(6) {
    min-width: 160px; /* Space for dates */
    white-space: nowrap;
}

#albums-table th:nth-child(7), /* Actions */
#albums-table td:nth-child(7) {
    width: 100px; /* Fixed width for actions */
    text-align: center;
}
#albums-table th:nth-child(8), /* Actions Column */
#albums-table td:nth-child(8) { /* Actions Column Data */
    width: 140px; /* Adjust width as needed for View/Delete */
    text-align: center;
    white-space: nowrap; /* Prevent buttons from wrapping */
}

/* Adjust button padding within the table */
#albums-table .secondary-btn-sm,
#albums-table .danger-btn-sm { /* Target both button types */
    padding: 0.5rem 0.8rem; /* Adjust padding */
    font-size: 0.85rem;
    margin: 0 2px; /* Add small horizontal margin */
}

/* --- END: Admin Albums Table Styles --- */


/* --- START: Album Details Modal Content Styles --- */

/* Make modal wider for album details */
.modal-content.extra-large {
    max-width: 1100px; /* Adjust as needed */
    margin: 5% auto; /* Adjust vertical margin */
}

.album-modal-info {
    margin-bottom: 1.5rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border-color);
}
.album-modal-info p {
    margin: 0.4rem 0;
    font-size: 0.95rem;
}
.album-modal-info strong {
    display: inline-block;
    min-width: 120px; /* Align labels */
    color: var(--header-bg);
}
.album-modal-info span[class^="status-"] { /* Style status similar to table */
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
    vertical-align: middle;
}

.album-modal-images,
.album-modal-spreads {
    margin-bottom: 1.5rem;
}

.album-modal-images h4,
.album-modal-spreads h4 {
    margin-bottom: 1rem;
    color: var(--header-bg);
    font-size: 1.1rem;
}

/* Image Grid Styling */
.image-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr)); /* Responsive grid */
    gap: 1rem;
    max-height: 300px; /* Limit height and allow scrolling */
    overflow-y: auto;
    padding: 0.5rem;
    background-color: #f8f9fa; /* Light background for grid area */
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
}

.image-grid-item {
    height: 100px; /* Fixed height for items */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: #fff;
    border-radius: 4px;
    overflow: hidden;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
}

.image-grid-item img {
    display: block;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain; /* Show whole image */
}

/* --- Spread Preview Styling (MODIFIED) --- */
.modal-spread-container {
    /* Removed border/background from here */
    margin-bottom: 1.5rem;
    padding: 0; /* Remove padding */
}

.modal-spread-container h5 {
    margin-top: 0;
    margin-bottom: 1rem;
    text-align: center;
    font-size: 1rem;
    color: #6c757d;
}

/* NEW: Wrapper to mimic #album-layout-area */
.modal-spread-layout-area {
    border: 2px dashed #ccc; /* Dashed border like creator */
    width: 100%;
    position: relative;
    background-color: #fff; /* White background like creator */
    overflow: hidden;
    margin-top: 10px;
    /* Aspect ratio will be set via inline style by JS */
}

.modal-pages-wrapper {
    display: flex;
    width: 100%;
    height: 100%;
    position: absolute; /* Position inside the layout area */
    top: 0;
    left: 0;
    gap: 0; /* Remove gap between pages */
}

.modal-page {
    flex: 1;
    height: 100%;
    position: relative;
    overflow: hidden;
    border: 1px solid #eee; /* Thin border like creator */
    box-sizing: border-box;
    background-color: transparent; /* Make page background transparent */
}

.modal-page.left-page {
    border-right: 1px solid #ccc; /* Separator line like creator */
}
.modal-page.right-page {
    border-left: none; /* No double border */
}


/* Placeholder styles (MODIFIED) */
.modal-placeholder {
    position: absolute;
    /* border: 1px dashed #adb5bd; /* Dashed border for empty */
    background-color: transparent; /* Transparent background */
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    box-sizing: border-box;
}

/* Style for empty placeholders */
.modal-placeholder.empty {
    border: 1px dashed #adb5bd;
    background-color: #f0f0f0; /* Light gray like creator */
    color: #999;
    font-size: 0.8em;
    text-align: center;
}
.modal-placeholder.empty span { /* Add span for text if needed */
    padding: 5px;
}


/* Style for filled placeholders */
.modal-placeholder.filled {
    border: 1px solid #aaa; /* Thin solid border like creator */
}

.modal-placeholder img {
    display: block;
    width: 100%;
    height: 100%;
    /* object-fit will be set via inline style by JS */
}

/* --- END: Album Details Modal Content Styles --- */
/* --- START: Admin Tutorials Table Styles --- */

#tutorials-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 2rem; /* Add space below */
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border-radius: var(--border-radius);
    overflow: hidden; /* Needed for border-radius */
}

#tutorials-table th,
#tutorials-table td {
    border: 1px solid var(--border-color);
    padding: 0.9rem 1.2rem; /* Consistent padding */
    text-align: left;
    vertical-align: middle; /* Vertically center content */
}

#tutorials-table th {
    background-color: #f8f9fa; /* Light header background */
    color: var(--header-bg);
    font-weight: 600;
    white-space: nowrap; /* Prevent headers wrapping */
}

#tutorials-table tbody tr:nth-child(even) {
    background-color: #fdfdfd; /* Zebra striping */
}

#tutorials-table tbody tr:hover {
    background-color: #e9ecef; /* Highlight on hover */
}

/* Specific Column Styles */
#tutorials-table th:nth-child(1), /* ID */
#tutorials-table td:nth-child(1) {
    width: 60px; /* Fixed width for ID */
    text-align: center;
}

#tutorials-table th:nth-child(2), /* Thumbnail */
#tutorials-table td:nth-child(2) {
    width: 80px; /* Fixed width for thumbnail */
    text-align: center;
}
#tutorials-table td:nth-child(2) img { /* Style the image inside the cell */
    max-width: 60px; /* Limit image size */
    max-height: 40px;
    height: auto;
    display: inline-block; /* Center image if needed */
    vertical-align: middle;
    border-radius: var(--border-radius-sm, 4px);
    border: 1px solid #eee; /* Subtle border */
}

#tutorials-table th:nth-child(3), /* Name */
#tutorials-table td:nth-child(3) {
    min-width: 200px; /* Give name more space */
}

#tutorials-table th:nth-child(4), /* Price */
#tutorials-table td:nth-child(4) {
    width: 100px;
    text-align: right; /* Align price right */
}

#tutorials-table th:nth-child(5), /* Available? */
#tutorials-table td:nth-child(5) {
    width: 100px;
    text-align: center; /* Center 'Yes'/'No' */
}

#tutorials-table th:nth-child(6), /* Actions */
#tutorials-table td:nth-child(6) {
    width: 150px; /* Adjust width for buttons */
    text-align: center;
    white-space: nowrap; /* Prevent buttons wrapping */
}

/* Style action buttons consistently */
#tutorials-table .edit-tutorial-btn,
#tutorials-table .delete-tutorial-btn {
    margin: 0 3px; /* Add small space between buttons */
    /* Styles are inherited from .secondary-btn-sm and .danger-btn-sm */
}
/* --- START: Admin Reviews Table Styles --- */

#reviews-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    margin-bottom: 2rem; /* Add space below */
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border-radius: var(--border-radius);
    overflow: hidden; /* Needed for border-radius */
}

#reviews-table th,
#reviews-table td {
    border: 1px solid var(--border-color);
    padding: 0.9rem 1.2rem; /* Consistent padding */
    text-align: left;
    vertical-align: middle; /* Vertically center content */
}

#reviews-table th {
    background-color: #f8f9fa; /* Light header background */
    color: var(--header-bg);
    font-weight: 600;
    white-space: nowrap; /* Prevent headers wrapping */
}

#reviews-table tbody tr:nth-child(even) {
    background-color: #fdfdfd; /* Zebra striping */
}

#reviews-table tbody tr:hover {
    background-color: #e9ecef; /* Highlight on hover */
}

/* Specific Column Styles */
#reviews-table th:nth-child(1), /* Date */
#reviews-table td:nth-child(1) {
    width: 150px;
    white-space: nowrap;
}

#reviews-table th:nth-child(2), /* Name */
#reviews-table td:nth-child(2) {
    min-width: 180px;
}

#reviews-table th:nth-child(3), /* Rating */
#reviews-table td:nth-child(3) {
    width: 100px;
    text-align: center;
    font-weight: bold;
    color: var(--secondary-accent); /* Yellow for stars */
}

#reviews-table th:nth-child(4), /* Review Text */
#reviews-table td:nth-child(4) {
    min-width: 250px;
    max-width: 400px; /* Limit width */
    white-space: normal; /* Allow text wrapping */
    vertical-align: top; /* Align text to top */
    line-height: 1.4;
}

#reviews-table th:nth-child(5), /* Status */
#reviews-table td:nth-child(5) {
    width: 100px;
    text-align: center;
}
#reviews-table td:nth-child(5) span { /* Style the status span */
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}
/* Add specific status colors */
.status-pending { background-color: #fff3cd; color: #664d03; } /* Yellowish */
.status-approved { background-color: #d1e7dd; color: #0f5132; } /* Greenish */


#reviews-table th:nth-child(6), /* Actions */
#reviews-table td:nth-child(6) {
    width: 150px; /* Adjust width for buttons */
    text-align: center;
    white-space: nowrap; /* Prevent buttons wrapping */
}

/* Style action buttons consistently */
#reviews-table .approve-review-btn,
#reviews-table .delete-review-btn {
    margin: 0 3px; /* Add small space between buttons */
    /* Styles are inherited from .primary-btn-sm and .danger-btn-sm */
}
#review-pending-badge {
    background-color: #8e44ad; /* Example: Purple */
    /* Or use another existing variable: var(--info-color, #3498db); */
}
/* --- END: Admin Tutorials Table Styles --- */
/* --- START: Pagination Styles --- */
.pagination-container {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.5rem 0;
    gap: 0.5rem; /* Space between buttons/text */
}

.pagination-button {
    padding: 0.5rem 1rem;
    border: 1px solid var(--border-color);
    background-color: var(--card-bg);
    color: var(--primary-accent);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: background-color 0.2s ease, color 0.2s ease;
    font-size: 0.9rem;
}

.pagination-button:hover:not(:disabled) {
    background-color: var(--primary-accent);
    color: white;
    border-color: var(--primary-accent);
}

.pagination-button:disabled {
    color: #aaa;
    background-color: #eee;
    border-color: #ddd;
    cursor: not-allowed;
}

.page-info {
    padding: 0 0.5rem;
    font-size: 0.95rem;
    color: #555;
}
/* --- END: Pagination Styles --- */
/* --- START: Guest Upload Event Styles --- */

.admin-subsection-header {
    margin-top: 2.5rem;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid var(--primary-accent);
    display: inline-block;
    font-size: 1.4rem;
}

.create-event-form {
    background: #f8f9fa;
    padding: 1.5rem 2rem;
    border-radius: var(--border-radius);
    border: 1px solid var(--border-color);
    margin-bottom: 2.5rem;
}

.create-event-form h3 {
    text-align: center;
    margin-top: 0;
    margin-bottom: 1.5rem;
    font-size: 1.3rem;
    color: var(--header-bg);
}

.create-event-form .duration-inputs {
    display: flex;
    gap: 1.5rem;
    flex-wrap: wrap;
}

.create-event-form .duration-inputs .form-group {
    flex: 1;
    min-width: 200px; /* Prevent inputs from becoming too small */
}

#guest-events-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
    font-size: 0.95rem;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.07);
    border-radius: var(--border-radius);
    overflow: hidden;
}

#guest-events-table th,
#guest-events-table td {
    border: 1px solid var(--border-color);
    padding: 0.9rem 1.2rem;
    text-align: left;
    vertical-align: middle;
}

#guest-events-table th {
    background-color: #f8f9fa;
    color: var(--header-bg);
    font-weight: 600;
    white-space: nowrap;
}

#guest-events-table tbody tr:nth-child(even) {
    background-color: #fdfdfd;
}

#guest-events-table tbody tr:hover {
    background-color: #e9ecef;
}

#guest-events-table td:nth-child(2) a {
    word-break: break-all; /* Allow long links to wrap */
}

/* Status Span Styling */
.zip-status {
    display: inline-block;
    padding: 0.3rem 0.6rem;
    border-radius: var(--border-radius);
    font-size: 0.85rem;
    font-weight: 500;
    text-transform: capitalize;
}
.zip-status.ready { background-color: #d1e7dd; color: #0f5132; }
.zip-status.generating { background-color: #fff3cd; color: #664d03; }
.zip-status.pending { background-color: #e9ecef; color: #495057; }
.zip-status a { color: inherit; text-decoration: underline; } /* Make link inside status blend in */

/* Actions Column Styling */
#guest-events-table td:last-child {
    text-align: center;
    white-space: nowrap;
}

#guest-events-table .secondary-btn-sm,
#guest-events-table .danger-btn-sm {
    margin: 0 4px; /* Add space between buttons */
}

/* --- END: Guest Upload Event Styles --- */


/* --- START: QR Code Modal Styles (Optional but recommended) --- */

#qr-code-container {
    padding: 1rem;
    background: white;
    display: inline-block; /* Center the QR code block */
    border: 1px solid var(--border-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}
#qr-code-modal {
    z-index: 1060; /* Ensure it appears above other modals (which are at 1050) */
#qr-code-modal .modal-content {
    max-width: 400px;
}

#qr-code-modal #qr-modal-title {
    word-break: break-word; /* Ensure long titles don't break layout */
}