:root {
    --primary: #3498db;
    --primary-dark: #2980b9;
    --sidebar-bg: #ffffff;
    --sidebar-text: #54667a;
    --sidebar-active-bg: #f4f8fb;
    --sidebar-active-text: #3498db;
    --topbar-bg: #3498db;
    --body-bg: #f4f7f6;
    --card-bg: #ffffff;
    --text-main: #3e5569;
    --text-muted: #a1aab2;
    --success: #28a745;
    --info: #17a2b8;
    --warning: #ffc107;
    --danger: #dc3545;
    --shadow: 0 2px 4px rgba(0,0,0,0.05);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Poppins', sans-serif;
    background-color: var(--body-bg);
    color: var(--text-main);
    overflow-x: hidden;
}

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

/* Sidebar */
.sidebar {
    width: 260px;
    background: var(--sidebar-bg);
    box-shadow: 2px 0 10px rgba(0,0,0,0.05);
    z-index: 100;
    transition: all 0.3s;
}

.sidebar-header {
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    border-bottom: 1px solid #f1f1f1;
}

.sidebar-header .logo {
    width: 35px;
    height: 35px;
}

.sidebar-header h1 {
    font-size: 20px;
    font-weight: 700;
    color: var(--primary);
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-label {
    padding: 10px 25px;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    font-weight: 600;
    letter-spacing: 1px;
}

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

.sidebar-menu ul li a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 25px;
    color: var(--sidebar-text);
    text-decoration: none;
    font-size: 14px;
    transition: all 0.2s;
    border-left: 3px solid transparent;
}

.sidebar-menu ul li a:hover {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
}

.sidebar-menu ul li a.active {
    background: var(--sidebar-active-bg);
    color: var(--sidebar-active-text);
    border-left-color: var(--primary);
    font-weight: 500;
}

.sidebar-menu ul li a i {
    font-size: 16px;
    width: 20px;
    text-align: center;
}

.badge-new {
    background: #2ed8b6;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

.badge-hot {
    background: #ff5370;
    color: white;
    font-size: 10px;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: auto;
}

/* Main Content */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* Topbar */
.topbar {
    height: 60px;
    background: var(--topbar-bg);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 25px;
    color: white;
}

.topbar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.topbar-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    cursor: pointer;
}

.topbar-credits {
    background: rgba(255,255,255,0.2);
    padding: 5px 15px;
    border-radius: 20px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.user-avatar {
    width: 32px;
    height: 32px;
    background: white;
    color: var(--primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 14px;
}

/* Content Area */
.content-wrapper {
    padding: 30px;
}

.welcome-section {
    background: white;
    padding: 20px 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    margin-bottom: 30px;
    border-left: 4px solid var(--primary);
}

.welcome-section h2 {
    font-size: 18px;
    color: var(--text-main);
    margin-bottom: 5px;
}

.welcome-section p {
    font-size: 13px;
    color: var(--text-muted);
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: var(--shadow);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    color: white;
}

.stat-icon.blue { background: #00bcd4; }
.stat-icon.green { background: #4caf50; }
.stat-icon.orange { background: #ff9800; }
.stat-icon.red { background: #f44336; }
.stat-icon.purple { background: #9c27b0; }
.stat-icon.indigo { background: #3f51b5; }
.stat-icon.teal { background: #009688; }

.stat-details h3 {
    font-size: 28px;
    color: var(--text-main);
    text-align: right;
}

.stat-details p {
    font-size: 12px;
    color: var(--text-muted);
    text-transform: uppercase;
    font-weight: 600;
}

/* Bottom Grid */
.bottom-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 25px;
}

.card {
    background: white;
    border-radius: 8px;
    box-shadow: var(--shadow);
    overflow: hidden;
}

.card-header {
    padding: 15px 20px;
    border-bottom: 1px solid #f1f1f1;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.card-header h3 {
    font-size: 14px;
    color: var(--text-main);
    text-transform: uppercase;
    font-weight: 700;
}

.tabs-nav {
    display: flex;
    gap: 20px;
}

.tab-link {
    font-size: 13px;
    color: var(--text-muted);
    text-decoration: none;
    padding-bottom: 15px;
    position: relative;
    font-weight: 500;
}

.tab-link.active {
    color: var(--primary);
}

.tab-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
}

.card-body {
    padding: 20px;
}

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

table th {
    text-align: left;
    font-size: 11px;
    text-transform: uppercase;
    color: var(--text-muted);
    padding: 10px;
    border-bottom: 1px solid #f1f1f1;
}

table td {
    padding: 12px 10px;
    font-size: 13px;
    border-bottom: 1px solid #f8f8f8;
}

.btn-action {
    width: 28px;
    height: 28px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f1f1f1;
    color: var(--text-main);
    text-decoration: none;
    transition: all 0.2s;
}

.btn-action:hover {
    background: var(--primary);
    color: white;
}

/* Small Cards for Right Column */
.info-box {
    padding: 15px;
    border-radius: 6px;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 15px;
}

.info-box.blue { background: #e3f2fd; border-left: 4px solid #2196f3; }
.info-box.orange { background: #fff3e0; border-left: 4px solid #ff9800; }
.info-box.gray { background: #f5f5f5; border-left: 4px solid #9e9e9e; }

.info-box i { font-size: 18px; }
.info-box-content h4 { font-size: 12px; margin-bottom: 2px; }
.info-box-content p { font-size: 11px; color: var(--text-muted); word-break: break-all; }

/* Forms and UI Elements */
.admin-form .form-group {
    margin-bottom: 20px;
}

.admin-form label {
    display: block;
    margin-bottom: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-main);
}

.admin-form input[type="text"],
.admin-form input[type="number"],
.admin-form input[type="email"],
.admin-form input[type="password"],
.admin-form textarea,
.admin-form select {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: 'Poppins', sans-serif;
    font-size: 14px;
    color: var(--text-main);
    transition: all 0.3s;
    background-color: #fcfcfc;
}

.admin-form input:focus,
.admin-form textarea:focus,
.admin-form select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
    background-color: #fff;
}

/* Custom Grid for Forms */
.grid-form-layout {
    display: grid;
    grid-template-columns: 1fr 320px;
    gap: 30px;
    align-items: start;
}

.form-section-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f1f1;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-section-title i {
    color: var(--primary);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s;
    border: none;
    font-family: 'Poppins', sans-serif;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: 0 4px 6px rgba(52, 152, 219, 0.2);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 12px rgba(52, 152, 219, 0.3);
}

.btn-secondary {
    background: #e9ecef;
    color: #495057;
}

.btn-secondary:hover {
    background: #dee2e6;
}

.btn-block {
    display: flex;
    width: 100%;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Table Image Preview */
.table-img-preview {
    width: 60px;
    height: 85px;
    object-fit: cover;
    border-radius: 6px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    transition: transform 0.2s;
    background-color: #f8f9fa;
}

.table-img-preview:hover {
    transform: scale(1.1);
    box-shadow: 0 4px 8px rgba(0,0,0,0.2);
}

/* Info Celda Contenido */
.content-info-cell {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.content-info-cell strong {
    font-size: 14px;
    color: var(--text-main);
    display: block;
}

.tech-info {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
}

.tech-info span {
    font-size: 12px;
    color: var(--text-muted);
    background: #f8f9fa;
    padding: 2px 8px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.tech-info span i {
    font-size: 10px;
}

/* Responsive Table */
@media (max-width: 768px) {
    .table-img-preview {
        width: 45px;
        height: 65px;
    }
}


/* Responsive */
@media (max-width: 992px) {
    .grid-form-layout { grid-template-columns: 1fr; }
}
