:root {
    --bg-color: #0d0d1a;
    --sidebar-bg: #151525;
    --card-bg: #1c1c2e;
    --text-primary: #ffffff;
    --text-secondary: #a0a0b0;
    --accent-color: #7b2cbf;
    --accent-glow: #9d4edd;
    --success-color: #00ff9d;
    --danger-color: #ff0055;
    --input-bg: #2b2b40;
    --border-color: #3b3b55;
}

.d-none {
    display: none !important;
}

body {
    background-color: var(--bg-color);
    color: var(--text-primary);
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    overflow: hidden;
}

/* Scrollbar */
::-webkit-scrollbar {
    width: 8px;
}
::-webkit-scrollbar-track {
    background: var(--bg-color);
}
::-webkit-scrollbar-thumb {
    background: var(--border-color);
    border-radius: 4px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--accent-color);
}

.wrapper {
    display: flex;
    width: 100%;
    height: 100%;
}

/* Sidebar */
#sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    border-right: 1px solid var(--border-color);
    display: flex;
    flex-direction: column;
    padding: 20px 0;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 0 20px 20px;
    border-bottom: 1px solid var(--border-color);
}

.sidebar-header h3 {
    margin: 0;
    font-weight: 300;
    letter-spacing: 1px;
    color: var(--accent-glow);
    text-shadow: 0 0 10px rgba(123, 44, 191, 0.5);
}

#sidebar ul.components {
    padding: 20px 0;
    list-style: none;
    margin: 0;
}

#sidebar ul li a {
    padding: 15px 20px;
    font-size: 1.1em;
    display: block;
    color: var(--text-secondary);
    text-decoration: none;
    transition: 0.3s;
    border-left: 3px solid transparent;
}

#sidebar ul li a:hover, #sidebar ul li.active > a {
    color: #fff;
    background: rgba(123, 44, 191, 0.1);
    border-left-color: var(--accent-color);
    text-shadow: 0 0 5px var(--accent-glow);
}

/* Content */
#content {
    flex: 1;
    padding: 20px;
    overflow-y: auto;
    position: relative;
    background: radial-gradient(circle at top right, rgba(123, 44, 191, 0.05), transparent 40%);
}

.navbar {
    padding: 15px;
    background: var(--card-bg);
    border-radius: 10px;
    margin-bottom: 20px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.3);
    border: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Cards */
.card {
    background: var(--card-bg);
    border-radius: 10px;
    padding: 20px;
    border: 1px solid var(--border-color);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    margin-bottom: 20px;
}

/* Tables */
.table-container {
    overflow-x: auto;
}
table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 10px;
}
th, td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid var(--border-color);
}
th {
    color: var(--text-secondary);
    font-weight: 600;
    text-transform: uppercase;
    font-size: 0.85em;
    letter-spacing: 1px;
}
tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* Forms */
.form-group {
    margin-bottom: 15px;
}
label {
    display: block;
    margin-bottom: 5px;
    color: var(--text-secondary);
}
input, textarea, select {
    width: 100%;
    padding: 10px;
    background: var(--input-bg);
    border: 1px solid var(--border-color);
    border-radius: 5px;
    color: #fff;
    outline: none;
    transition: 0.3s;
}
input:focus, textarea:focus, select:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 5px rgba(123, 44, 191, 0.3);
}

/* Buttons */
.btn {
    padding: 10px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-weight: 600;
    transition: 0.3s;
    text-decoration: none;
    display: inline-block;
}
.btn-primary {
    background: linear-gradient(45deg, var(--accent-color), var(--accent-glow));
    color: #fff;
    box-shadow: 0 0 10px rgba(123, 44, 191, 0.4);
}
.btn-primary:hover {
    box-shadow: 0 0 20px rgba(123, 44, 191, 0.6);
    transform: translateY(-2px);
}
.btn-danger {
    background: linear-gradient(45deg, #a30036, var(--danger-color));
    color: #fff;
    box-shadow: 0 0 10px rgba(255, 0, 85, 0.4);
}
.btn-danger:hover {
    box-shadow: 0 0 20px rgba(255, 0, 85, 0.6);
    transform: translateY(-2px);
}

/* Authentication */
.auth-wrapper {
    display: flex;
    justify-content: center;
    align-items: center;
    height: 100vh;
    width: 100%;
    background: radial-gradient(circle at center, #1b1b2f 0%, #0d0d1a 100%);
}
.login-box {
    width: 400px;
    padding: 40px;
    background: rgba(28, 28, 46, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 15px 35px rgba(0,0,0,0.5);
}
.login-title {
    text-align: center;
    margin-bottom: 30px;
    font-size: 2em;
    color: #fff;
    text-shadow: 0 0 10px var(--accent-glow);
}

/* Custom Pagination matching image */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 40px;
    margin-bottom: 20px;
}

.pagination-item {
    display: flex;
    justify-content: center;
    align-items: center;
    min-width: 45px;
    height: 45px;
    padding: 0 15px;
    background: transparent;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    font-size: 1.1em;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.pagination-item:hover {
    border-color: var(--accent-color);
    color: #fff;
    background: rgba(108, 92, 231, 0.1);
}

.pagination-item.active {
    background: #6C5CE7; /* Specific purple from image */
    border-color: #6C5CE7;
    color: #fff;
    box-shadow: 0 5px 15px rgba(108, 92, 231, 0.4);
}

.pagination-item.disabled {
    opacity: 0.3;
    pointer-events: none;
}

.pagination-ellipsis {
    color: var(--text-secondary);
    font-size: 1.2em;
    padding: 0 5px;
}

/* Grid Header & Inline Add Form */
.grid-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding: 20px;
    background: var(--card-bg);
    border-radius: 15px;
    border: 1px solid var(--border-color);
}

.add-form-inline {
    display: flex;
    gap: 10px;
    flex: 1;
    margin-left: 20px;
}

.add-form-inline input {
    flex: 1;
}

/* Quote Card Overlay & Actions */
.delete-btn-overlay {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 32px;
    height: 32px;
    background: rgba(255, 0, 85, 0.85);
    border: none;
    border-radius: 8px;
    color: #fff;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    z-index: 10;
    transition: 0.3s;
    opacity: 0;
}

.quote-card:hover .delete-btn-overlay {
    opacity: 1;
}

.delete-btn-overlay:hover {
    background: var(--danger-color);
    transform: scale(1.1);
}

/* Full Screen Modal */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(13, 13, 26, 0.98);
    backdrop-filter: blur(15px);
    display: none;
    justify-content: center;
    align-items: center;
    z-index: 9999;
}

.modal-content-full {
    width: 90%;
    height: 90%;
    display: flex;
    position: relative;
    gap: 40px;
    animation: zoomIn 0.3s ease-out;
}

@keyframes zoomIn {
    from { opacity: 0; transform: scale(0.9); }
    to { opacity: 1; transform: scale(1); }
}

.modal-image-view {
    flex: 2;
    display: flex;
    justify-content: center;
    align-items: center;
    background: #000;
    border-radius: 20px;
    overflow: hidden;
}

.modal-image-view img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.modal-details {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--border-color);
}

.close-modal {
    position: absolute;
    top: -40px;
    right: 0;
    font-size: 2em;
    color: #fff;
    cursor: pointer;
    transition: 0.3s;
}

.close-modal:hover {
    color: var(--danger-color);
    transform: rotate(90deg);
}

/* Mobile Responsive */
@media (max-width: 1024px) {
    .modal-content-full {
        flex-direction: column;
        overflow-y: auto;
    }
    .modal-image-view {
        height: 50%;
        flex: none;
    }
}

@media (max-width: 768px) {
    #sidebar {
        margin-left: -250px;
        position: absolute;
        height: 100%;
        z-index: 999;
    }
    #sidebar.active {
        margin-left: 0;
    }
    .wrapper {
        position: relative;
    }
    .grid-header {
        flex-direction: column;
        align-items: stretch;
    }
    .add-form-inline {
        margin-left: 0;
        margin-top: 15px;
        flex-direction: column;
    }
}
