/* CSS Reset - Remove default margins and padding */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    margin: 0;
    padding: 0;
    height: 100%;
    font-family: Arial, sans-serif;
    background-color: #f0f8ff; /* Light blue background for entire page */
}

body {
    font-family: Arial, sans-serif;
}

h1 {
    color: #333;
}

form label {
    display: block;
    margin-top: 10px;
}

table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 20px;
}

table, th, td {
    border: 1px solid #ccc;
}

th, td {
    padding: 10px;
    text-align: left;
}

.dashboard {
    display: flex;
    min-height: 100vh;
}

/* Professional Side Menu Design - Rail Style */
.side-menu {
    width: 60px; /* Collapsed width - only shows icons */
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    padding: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    position: fixed; /* Make it sticky/fixed */
    left: 0;
    top: 0;
    height: 100vh; /* Full viewport height */
    overflow: hidden;
    transition: width 0.3s ease;
    z-index: 1000;
}

.side-menu.expanded {
    width: 260px; /* Expanded width - shows full menu */
}

.side-menu::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
}

/* Menu Toggle Button */
.menu-toggle {
    padding: 16px;
    cursor: pointer;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-menu.expanded .menu-toggle {
    justify-content: flex-end;
    padding-right: 24px;
}

.toggle-icon {
    color: #ecf0f1;
    font-size: 18px;
    font-weight: 600;
    transition: transform 0.3s ease;
}

.side-menu.expanded .toggle-icon {
    transform: rotate(90deg);
}

.menu-toggle:hover {
    background-color: rgba(66, 133, 244, 0.1);
}

.side-menu ul {
    list-style-type: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 60px); /* Adjust for toggle button */
}

.side-menu ul li {
    margin: 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-menu ul li:last-child {
    margin-top: auto;
    margin-bottom: 24px;
    border-bottom: none;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
    padding-top: 20px;
}

/* Menu links styling */
.side-menu ul li a {
    display: flex;
    align-items: center;
    padding: 16px;
    text-decoration: none;
    color: #ecf0f1;
    font-weight: 500;
    font-size: 14px;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    justify-content: center; /* Center icons when collapsed */
}

.side-menu.expanded ul li a {
    justify-content: flex-start; /* Left align when expanded */
    padding-left: 24px;
}

/* Icon positioning using ::before pseudo-element */
.side-menu ul li a::before {
    display: block;
    font-size: 24px; /* Larger icons when collapsed */
    line-height: 1;
    margin-right: 0;
    transition: all 0.3s ease;
    position: relative;
    z-index: 2;
    text-align: center;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.side-menu.expanded ul li a::before {
    font-size: 18px; /* Smaller icons when expanded */
    margin-right: 12px;
    width: 20px;
    height: 20px;
}

/* Blue accent bar */
.side-menu ul li a::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 4px;
    background-color: #4285f4;
    transform: scaleY(0);
    transition: transform 0.3s ease;
    z-index: 1;
}

.side-menu ul li a:hover {
    background-color: rgba(66, 133, 244, 0.1);
    color: #ffffff;
}

.side-menu.expanded ul li a:hover {
    padding-left: 32px;
}

.side-menu ul li a:hover::after {
    transform: scaleY(1);
}

.side-menu ul li a:active,
.side-menu ul li a.active {
    background-color: rgba(66, 133, 244, 0.2);
    color: #4285f4;
    font-weight: 600;
}

.side-menu ul li a.active::after {
    transform: scaleY(1);
}

/* Menu Text - Hidden when collapsed */
.menu-text {
    opacity: 0;
    visibility: hidden;
    transform: translateX(-20px);
    transition: all 0.3s ease;
    margin-left: 0;
    white-space: nowrap;
    overflow: hidden;
    width: 0;
}

.side-menu.expanded .menu-text {
    opacity: 1;
    visibility: visible;
    transform: translateX(0);
    width: auto;
}

/* Add icons before menu text */
.side-menu ul li a[id="home"]::before {
    content: "🏠";
}

.side-menu ul li a[id="uploadFiles"]::before {
    content: "📤";
}

.side-menu ul li a[id="viewFiles"]::before {
    content: "📁";
}

.side-menu ul li a[id="categories"]::before {
    content: "🗂️";
}

.side-menu ul li a[id="addCategory"]::before {
    content: "🏷️";
}

.side-menu ul li a[id="logout"]::before {
    content: "↗️";
}

/* Special styling for logout button */
.side-menu ul li:last-child a {
    color: rgba(255, 255, 255, 0.9);
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    margin: 0 12px;
}

.side-menu ul li:last-child a:hover {
    background-color: rgba(255, 255, 255, 0.2);
    color: #ffffff;
    transform: translateX(2px);
}

.content {
    flex: 1;
    padding: 32px;
    background-color: #f8f9fa;
    min-height: 100vh;
    overflow-y: auto;
    margin-left: 60px; /* Account for collapsed sidebar width */
    transition: margin-left 0.3s ease;
}

/* Adjust content margin when sidebar is expanded */
.side-menu.expanded ~ .content {
    margin-left: 260px; /* Account for expanded sidebar width */
}

/* Category Cards */
.category-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.category-card {
    background-color: #fff;
    border-radius: 8px;
    padding: 15px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    position: relative;
}

.category-card h3 {
    margin-top: 0;
    color: #333;
}

.tags {
    margin: 10px 0;
}

.tag {
    background-color: #e0f7fa;
    color: #00838f;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    margin-right: 5px;
    display: inline-block;
    margin-bottom: 5px;
}

.delete-btn {
    background-color: #f44336;
    color: white;
    border: none;
    padding: 5px 10px;
    border-radius: 4px;
    cursor: pointer;
    position: absolute;
    bottom: 15px;
    right: 15px;
}

.delete-btn:hover {
    background-color: #d32f2f;
}

/* Category Form */
.category-form {
    max-width: 100%;
    margin: 0;
    background: transparent; /* Remove gradient and card styling */
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); /* Stronger shadow for better visibility */
    border: none; /* Remove border */
    position: relative;
    overflow: hidden;
}

.category-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
}

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

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

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
    font-family: inherit;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    transform: translateY(-1px);
}

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

.submit-btn {
    background: linear-gradient(135deg, #34a853, #2e7d32);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.submit-btn:hover::before {
    left: 100%;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(52, 168, 83, 0.3);
}

.submit-btn:active {
    transform: translateY(0);
}

.submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* Modern Sign-in Page Design */
.signin-page {
    min-height: 100vh;
    background: url('https://firebasestorage.googleapis.com/v0/b/visual-c5ee2.firebasestorage.app/o/files%2F1756950242721_file.png?alt=media&token=43e61d5f-955c-4a94-99c4-e755eecbb496') no-repeat center center fixed;
    background-size: cover;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    position: relative;
    overflow: hidden;
}

/* Animated background elements */
.signin-page::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255,255,255,0.1) 1px, transparent 1px);
    background-size: 50px 50px;
    animation: float 20s ease-in-out infinite;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

.signin-container {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    padding: 40px;
    border-radius: 20px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
    width: 100%;
    max-width: 450px;
    position: relative;
    z-index: 2;
    transform: translateY(0);
    transition: transform 0.3s ease;
}

.signin-container:hover {
    transform: translateY(-5px);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15);
}

/* Brand header styling */
.signin-container h1 {
    text-align: center;
    margin-bottom: 30px;
    color: #2c3e50;
    font-size: 28px;
    font-weight: 600;
    background: linear-gradient(135deg, #4285f4, #34a853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.signin-container h1::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 50%;
    transform: translateX(-50%);
    width: 50px;
    height: 3px;
    background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
    border-radius: 2px;
}

/* Form styling */
#signInForm {
    margin-top: 20px;
}

.form-group {
    margin-bottom: 25px;
    position: relative;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #555;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.form-group input {
    width: 100%;
    padding: 15px 20px;
    border: 2px solid #e1e5e9;
    border-radius: 12px;
    font-size: 16px;
    background-color: #f8f9fa;
    transition: all 0.3s ease;
    box-sizing: border-box;
}

.form-group input:focus {
    outline: none;
    border-color: #4285f4;
    background-color: #fff;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    transform: translateY(-2px);
}

.form-group input::placeholder {
    color: #aaa;
    font-style: italic;
}

/* Sign-in button styling */
#signInForm button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-top: 10px;
    position: relative;
    overflow: hidden;
}

#signInForm button[type="submit"]:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px rgba(66, 133, 244, 0.3);
}

#signInForm button[type="submit"]:active {
    transform: translateY(0);
}

#signInForm button[type="submit"]::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

#signInForm button[type="submit"]:hover::before {
    left: 100%;
}

button {
    padding: 10px 15px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 16px;
}

button:hover {
    background-color: #3367d6;
}

/* Connection status indicators */
.online-status, .offline-status {
    padding: 8px 12px;
    border-radius: 4px;
    margin: 10px 0;
    display: inline-block;
}

.online-status {
    background-color: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid #2e7d32;
}

.offline-status {
    background-color: #fff3e0;
    color: #e65100;
    border-left: 4px solid #e65100;
}

.date {
    font-size: 12px;
    color: #777;
    margin-top: 10px;
}

/* File Upload Styles */
.upload-container {
    width: 100%;
    max-width: 100%;
    margin: 0;
    padding: 0;
}

.upload-form {
    background: transparent; /* Remove gradient and card styling */
    padding: 2rem;
    border-radius: 16px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); /* Stronger shadow for better visibility */
    border: none; /* Remove border */
    position: relative;
    overflow: hidden;
}

.upload-form::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
}

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

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

.upload-form .form-group input[type="file"],
.upload-form .form-group input[type="text"],
.upload-form .form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #e1e8ed;
    border-radius: 8px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: all 0.3s ease;
    background-color: #ffffff;
}

.upload-form .form-group input[type="file"]:focus,
.upload-form .form-group input[type="text"]:focus,
.upload-form .form-group select:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 3px rgba(66, 133, 244, 0.1);
    transform: translateY(-1px);
}

.upload-form .form-group input[type="file"] {
    padding: 0.5rem;
    cursor: pointer;
}

.upload-form .submit-btn {
    background: linear-gradient(135deg, #4285f4, #1976d2);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    width: 100%;
    position: relative;
    overflow: hidden;
}

.upload-form .submit-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.upload-form .submit-btn:hover::before {
    left: 100%;
}

.upload-form .submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(66, 133, 244, 0.3);
}

.upload-form .submit-btn:active {
    transform: translateY(0);
}

.upload-form .submit-btn:disabled {
    background: #cccccc;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.progress-container {
    margin-top: 1.5rem;
    background-color: #f1f3f4;
    border-radius: 8px;
    height: 24px;
    position: relative;
    display: none;
    overflow: hidden;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
}

.progress-bar {
    height: 100%;
    background: linear-gradient(135deg, #34a853, #4285f4);
    border-radius: 8px;
    transition: width 0.3s ease;
    width: 0%;
    position: relative;
}

.progress-bar::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(45deg, transparent 35%, rgba(255, 255, 255, 0.3) 50%, transparent 65%);
    animation: progress-shine 2s infinite;
}

@keyframes progress-shine {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.progress-text {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: #333;
    font-size: 12px;
    font-weight: bold;
}

/* File Listing Styles */
.files-controls {
    display: flex;
    justify-content: space-between;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.search-container {
    display: flex;
    margin-bottom: 10px;
}

.search-container input {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px 0 0 4px;
    flex-grow: 1;
}

.search-container button {
    padding: 8px 15px;
    background-color: #4285f4;
    color: white;
    border: none;
    border-radius: 0 4px 4px 0;
    cursor: pointer;
}

.filter-container select {
    padding: 8px;
    border: 1px solid #ddd;
    border-radius: 4px;
    min-width: 150px;
}

.files-container {
    display: block; /* Stack file items vertically */
    width: 100%;
    padding: 0;
    margin: 0;
}

.file-list-item {
    display: block;
    width: 100%;
    box-sizing: border-box;
    margin-bottom: 16px;
    background-color: #fff;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    border-radius: 5px;
    transition: all 0.3s ease;
    padding: 16px 24px;
}

.file-list-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.18);
}

/* Enhanced hover effect for clickable cards */
.file-list-item.clickable-card {
    cursor: pointer;
    user-select: none;
}

.file-list-item.clickable-card:hover {
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.15);
    transform: translateY(-2px);
    background-color: #f8f9fa;
}

.file-list-item.clickable-card:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.file-list-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    width: 100%;
}

.file-title {
    font-weight: bold;
    flex: 2 1 200px;
    min-width: 120px;
    word-break: break-all;
}

.file-tags, .file-size, .file-date {
    flex: 1 1 120px;
    padding: 8px 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.file-actions {
    flex: 1.5 1 180px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 8px;
}

.view-btn, .download-btn, .delete-file-btn {
    padding: 6px 12px !important;
    border-radius: 4px !important;
    font-size: 12px !important;
    text-decoration: none;
    text-align: center;
    cursor: pointer;
    display: inline-flex !important;
    align-items: center;
    justify-content: center;
    min-width: 60px !important;
    max-width: 80px !important;
    height: 28px !important;
    margin: 0 2px;
    border: none;
    font-weight: 500;
    transition: all 0.2s ease;
    box-sizing: border-box !important;
}

.view-btn {
    background-color: #6c93f5;
    color: white;
}

.view-btn:hover {
    background-color: #2b75e0;
    box-shadow: 0 2px 4px rgba(66, 133, 244, 0.2);
}

.download-btn {
    background-color: #4CAF50;
    color: white;
}

.download-btn:hover {
    background-color: #2d9144;
    box-shadow: 0 2px 4px rgba(52, 168, 83, 0.2);
}

.delete-file-btn {
    background-color: #ea4335;
    color: white;
}

.delete-file-btn:hover {
    background-color: #d33828;
    box-shadow: 0 2px 4px rgba(234, 67, 53, 0.2);
}

/* File Controls Section */
.files-controls-section {
    background-color: #f8f9fa;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    border: 1px solid #e9ecef;
}

.search-filter-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 16px;
    margin-bottom: 20px;
    align-items: baseline;
}

/* Reset and normalize both input and select */
.search-container input,
.filter-container select {
    /* Reset all browser defaults */
    all: unset;
    
    /* Apply consistent styling */
    display: block;
    width: 100%;
    height: 44px;
    padding: 0 16px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 14px;
    font-weight: 400;
    line-height: 42px; /* 44px height - 2px border */
    background-color: white;
    color: #333;
    box-sizing: border-box;
    
    /* Ensure consistent positioning */
    margin: 0;
    padding-top: 0;
    padding-bottom: 0;
}

.search-container {
    display: block;
}

.search-container input {
    cursor: text;
}

.search-container input:focus {
    outline: none;
    border-color: #4285f4;
    box-shadow: 0 0 0 2px rgba(66, 133, 244, 0.2);
}

.filter-container {
    display: block;
}

.filter-container select {
    cursor: pointer;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23333' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
    padding-right: 40px; /* Make room for arrow */
}

.file-type-filters {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.filter-label {
    font-weight: 600;
    color: #555;
    margin-right: 8px;
    font-size: 14px;
}

.file-type-chips {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.file-type-chip {
    display: inline-block;
    padding: 6px 12px;
    background-color: #e9ecef;
    color: #495057;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid transparent;
    user-select: none;
}

.file-type-chip:hover {
    background-color: #dee2e6;
    transform: translateY(-1px);
}

.file-type-chip.active {
    background-color: #4285f4;
    color: white;
    border-color: #4285f4;
}

.file-type-chip.active:hover {
    background-color: #3367d6;
}

/* Results Section */
.files-results-section {
    background-color: white;
    border-radius: 8px;
    padding: 20px;
    border: 1px solid #e9ecef;
}

/* Dashboard Welcome Section - Beautiful Centered Layout */
.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 2rem;
    background: transparent; /* Remove gradient to use page background */
}

.welcome-content {
    text-align: center;
    max-width: 600px;
    width: 100%;
}

.dashboard-title {
    font-size: 2.5rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #4285f4, #34a853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.dashboard-subtitle {
    font-size: 1.1rem;
    color: #64748b;
    margin-bottom: 3rem;
    font-weight: 400;
}

.action-buttons-container {
    display: flex;
    gap: 1.5rem;
    justify-content: center;
    flex-wrap: nowrap;
    align-items: stretch;
}

/* Modern Action Button Styling */
.action-btn {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.5rem 2rem;
    border: none;
    border-radius: 16px;
    cursor: pointer;
    font-family: inherit;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    min-width: 250px;
    position: relative;
    overflow: hidden;
}

.action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.action-btn:hover::before {
    left: 100%;
}

.action-btn.primary {
    background: linear-gradient(135deg, #4285f4, #1976d2);
    color: white;
}

.action-btn.secondary {
    background: linear-gradient(135deg, #34a853, #2e7d32);
    color: white;
}

.action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
}

.action-btn:active {
    transform: translateY(0);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
}

.btn-icon {
    font-size: 2rem;
    line-height: 1;
}

.btn-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    text-align: left;
}

.btn-title {
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.btn-description {
    font-size: 0.9rem;
    opacity: 0.9;
    font-weight: 400;
}

/* Form Page Containers - Centered Layout */
.form-page-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: calc(100vh - 100px);
    padding: 2rem;
    background: transparent; /* Remove gradient to use page background */
}

.form-page-content {
    width: 100%;
    max-width: 600px;
    text-align: center;
}

.form-page-title {
    font-size: 2rem;
    font-weight: 600;
    color: #2c3e50;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #4285f4, #34a853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Categories Page Styles */
.categories-page {
    max-width: 1200px;
    margin: 0 auto;
}

.page-title {
    font-size: 2.5rem;
    font-weight: 700;
    color: #2c3e50;
    margin-bottom: 2rem;
    background: linear-gradient(135deg, #4285f4, #34a853);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

.page-title::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 60px;
    height: 4px;
    background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
    border-radius: 2px;
}

.page-actions {
    margin-bottom: 2rem;
    display: flex;
    justify-content: flex-start;
    align-items: center;
}

.page-actions .action-btn {
    background: linear-gradient(135deg, #4285f4, #34a853);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(66, 133, 244, 0.3);
}

.page-actions .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(66, 133, 244, 0.4);
}

.page-actions .action-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.page-actions .action-btn:hover::before {
    left: 100%;
}

.page-actions .btn-icon {
    font-size: 1.1rem;
}

.page-actions .btn-title {
    font-weight: 600;
}

/* Categories Grid */
.categories-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

/* Category Card Item */
.category-card-item {
    background: transparent; /* Remove gradient and card styling */
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15); /* Stronger shadow for better visibility */
    border: none; /* Remove border */
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.category-card-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, #4285f4, #34a853, #fbbc05, #ea4335);
}

.category-card-item:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
    border-color: rgba(66, 133, 244, 0.3);
}

/* Category Card Header */
.category-card-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 1rem;
}

.category-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #2c3e50;
    margin: 0;
    flex: 1;
    line-height: 1.4;
}

/* Category Actions */
.category-actions {
    display: flex;
    gap: 0.5rem;
    margin-left: 1rem;
}

.edit-category-btn,
.delete-category-btn {
    background: rgba(66, 133, 244, 0.1);
    border: none;
    border-radius: 8px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    position: relative;
    overflow: hidden;
}

.edit-category-btn {
    background: rgba(52, 168, 83, 0.1);
}

.edit-category-btn:hover {
    background: rgba(52, 168, 83, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(52, 168, 83, 0.3);
}

.delete-category-btn {
    background: rgba(234, 67, 53, 0.1);
}

.delete-category-btn:hover {
    background: rgba(234, 67, 53, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(234, 67, 53, 0.3);
}

.edit-category-btn span,
.delete-category-btn span {
    font-size: 1rem;
    transition: transform 0.3s ease;
}

.edit-category-btn:hover span,
.delete-category-btn:hover span {
    transform: scale(1.1);
}

/* Category Tags */
.category-tags {
    margin-bottom: 1rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.category-tags .tag {
    background: linear-gradient(135deg, rgba(66, 133, 244, 0.1), rgba(52, 168, 83, 0.1));
    color: #2c3e50;
    padding: 0.25rem 0.75rem;
    border-radius: 20px;
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid rgba(66, 133, 244, 0.2);
    transition: all 0.3s ease;
}

.category-tags .tag:hover {
    transform: translateY(-1px);
    box-shadow: 0 2px 8px rgba(66, 133, 244, 0.2);
}

/* Category Description */
.category-description {
    margin-bottom: 1rem;
}

.category-description p {
    color: #5a6c7d;
    font-size: 0.9rem;
    line-height: 1.6;
    margin: 0;
}

/* Category Date */
.category-date {
    font-size: 0.8rem;
    color: #8b9dc3;
    font-style: italic;
    margin-top: auto;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 3rem;
    background: linear-gradient(135deg, #ffffff 0%, #f8f9ff 100%);
    border-radius: 16px;
    border: 2px dashed rgba(66, 133, 244, 0.3);
    margin: 2rem 0;
}

.empty-state p {
    color: #5a6c7d;
    font-size: 1.1rem;
    margin-bottom: 1.5rem;
}

.empty-state .action-btn {
    background: linear-gradient(135deg, #34a853, #2e7d32);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.empty-state .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(52, 168, 83, 0.3);
}

/* Error State */
.error-state {
    text-align: center;
    padding: 3rem;
    background: rgba(234, 67, 53, 0.05);
    border-radius: 16px;
    border: 2px solid rgba(234, 67, 53, 0.2);
    margin: 2rem 0;
}

.error-state p {
    color: #d32f2f;
    font-size: 1rem;
    margin-bottom: 1.5rem;
}

.error-state .action-btn {
    background: linear-gradient(135deg, #ea4335, #d32f2f);
    color: white;
    border: none;
    padding: 0.875rem 1.5rem;
    border-radius: 12px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
}

.error-state .action-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(234, 67, 53, 0.3);
}

/* Form Actions for Edit Category */
.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

.form-actions .submit-btn {
    flex: 1;
    background: linear-gradient(135deg, #34a853, #2e7d32);
}

.form-actions .cancel-btn {
    flex: 1;
    background: linear-gradient(135deg, #6c757d, #5a6268);
    color: white;
    border: none;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.form-actions .cancel-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(108, 117, 125, 0.3);
}

.form-actions .cancel-btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s;
}

.form-actions .cancel-btn:hover::before {
    left: 100%;
}

/* Add icon for Categories menu item */
.side-menu ul li a[id="categories"]::after {
    content: "";
    margin-right: 12px;
    font-size: 16px;
    order: -1;
}

/* Responsive Design for Categories */
@media (max-width: 768px) {
    .categories-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }
    
    .category-card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 1rem;
    }
    
    .category-actions {
        margin-left: 0;
        align-self: flex-end;
    }
    
    .page-title {
        font-size: 2rem;
    }
    
    .form-actions {
        flex-direction: column;
    }
}

@media (max-width: 480px) {
    .dashboard-title {
        font-size: 1.8rem;
    }
    
    .dashboard-subtitle {
        font-size: 1rem;
        margin-bottom: 2rem;
    }
    
    .action-buttons-container {
        gap: 0.75rem;
    }
    
    .action-btn {
        padding: 1rem 1.25rem;
        min-width: 140px;
        max-width: 48%;
    }
    
    .btn-title {
        font-size: 1rem;
    }
    
    .btn-description {
        font-size: 0.8rem;
    }
    
    .btn-icon {
        font-size: 1.5rem;
    }
    
    .form-page-container {
        padding: 0.5rem;
    }
    
    .form-page-title {
        font-size: 1.5rem;
        margin-bottom: 1rem;
    }
    
    .category-form,
    .upload-form {
        padding: 1rem;
    }
}
