
:root {
    --color-primary: #4f46e5; 
    --color-primary-hover: #4338ca; 
    --color-secondary: #6b7280; 
    --color-secondary-hover: #4b5563; 
    --color-danger: #ef4444; 
    --color-danger-hover: #dc2626; 
    --color-info: #3b82f6;  
    --color-info-hover: #2563eb; 
    --color-background: #f3f4f6;  
    --color-surface: #ffffff;
    --color-text: #1f2937;  
    --color-text-light: #6b7280;  
    --border-color: #d1d5db; 
    --border-color-light: #e5e7eb;  
    --border-radius: 8px;
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-md: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --transition-speed: 0.2s ease-in-out;
}

*, *::before, *::after { box-sizing: border-box; }

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    background-color: var(--color-background);
    color: var(--color-text);
    margin: 0;
}


.admin-container {
    max-width: 1200px;
    margin: 2rem auto;
    padding: 0 1.5rem;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}
.admin-header h1 { font-size: 1.875rem; font-weight: 700; margin: 0; }


.content-card {
    background-color: var(--color-surface);
    padding: 2rem;
    border-radius: var(--border-radius);
    box-shadow: var(--shadow);
}
.alert-success { background-color: #dcfce7; color: #166534; padding: 1rem; border-left: 5px solid #22c55e; border-radius: 4px; margin-bottom: 2rem; font-weight: 500; }
.btn { display: inline-flex; align-items: center; justify-content: center; padding: 0.65rem 1.25rem; border: 1px solid transparent; border-radius: 6px; cursor: pointer; font-weight: 600; font-size: 0.9rem; text-decoration: none; white-space: nowrap; transition: all var(--transition-speed); }
.btn:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.btn-primary { background-color: var(--color-primary); color: white; } .btn-primary:hover { background-color: var(--color-primary-hover); }
.btn-secondary { background-color: var(--color-secondary); color: white; } .btn-secondary:hover { background-color: var(--color-secondary-hover); }
.btn-info { background-color: var(--color-info); color: white; } .btn-info:hover { background-color: var(--color-info-hover); }
.btn-danger { background-color: var(--color-danger); color: white; } .btn-danger:hover { background-color: var(--color-danger-hover); }


.styled-table { width: 100%; border-collapse: collapse; }
.styled-table thead { border-bottom: 2px solid var(--border-color); }
.styled-table th { padding: 0.75rem 1rem; text-align: left; font-size: 0.75rem; color: var(--color-text-light); text-transform: uppercase; letter-spacing: 0.05em; }
.styled-table tbody tr { border-bottom: 1px solid var(--border-color-light); }
.styled-table tbody tr:last-child { border-bottom: none; }
.styled-table tbody tr:nth-child(even) { background-color: #f9fafb; }
.styled-table td { padding: 1rem; vertical-align: middle; }
.actions-group { display: flex; justify-content: flex-end; align-items: center; gap: 0.75rem; }


.form-card h2 { font-size: 1.25rem; font-weight: 600; margin-top: 0; margin-bottom: 2rem; padding-bottom: 1rem; border-bottom: 1px solid var(--border-color-light); color: var(--color-primary); }
.form-group { margin-bottom: 1.5rem; }
.form-group label { font-weight: 500; font-size: 0.9rem; display: block; margin-bottom: 0.5rem; color: var(--color-text-light); }
.form-control { display: block; width: 100%; padding: 0.85rem 1rem; font-size: 1rem; line-height: 1.5; color: var(--color-text); background-color: #fff; border: 1px solid var(--border-color); border-radius: 6px; transition: all var(--transition-speed); }
.form-control:focus { outline: none; border-color: var(--color-primary); box-shadow: 0 0 0 4px rgb(79 70 229 / 20%); }
.form-actions { display: flex; justify-content: flex-end; align-items: center; gap: 1rem; margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid var(--border-color-light); }


.dashboard-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 1.5rem; }
.dashboard-card { display: block; background-color: #fff; padding: 2rem; border-radius: var(--border-radius); box-shadow: var(--shadow); text-align: center; text-decoration: none; color: var(--color-text); transition: all var(--transition-speed); }
.dashboard-card:hover { transform: translateY(-5px); box-shadow: var(--shadow-md); }
.dashboard-card h2 { margin-top: 0; font-size: 1.25rem; color: var(--color-primary); }
.dashboard-card p { color: var(--color-text-light); font-size: 0.9rem; line-height: 1.5; }
.media-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 1.5rem; }
.media-card { background-color: #fff; border-radius: var(--border-radius); box-shadow: var(--shadow-sm); overflow: hidden; position: relative; transition: all var(--transition-speed); }
.media-card:hover { box-shadow: var(--shadow-md); transform: translateY(-3px); }
.media-card-thumbnail { display: block; width: 100%; height: 130px; object-fit: cover; background-color: var(--border-color-light); }
.media-card-info { padding: 0.75rem; border-top: 1px solid var(--border-color-light); }
.media-card-title { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin: 0; }
.media-card-delete-form { position: absolute; top: 0.5rem; right: 0.5rem; }
.media-card .btn-danger { background-color: rgba(0,0,0,0.4); border: 1px solid rgba(255,255,255,0.3); padding: 0.25rem 0.6rem; font-size: 1.2rem; }
.media-card .btn-danger:hover { background-color: var(--color-danger); }


@media (max-width: 768px) {
    .admin-container { margin: 1rem auto; padding: 0 1rem; }
    .admin-header { flex-direction: column; align-items: flex-start; }
    .content-card { padding: 1.5rem; }


    .styled-table thead {
        border: none;
        clip: rect(0 0 0 0);
        height: 1px;
        margin: -1px;
        overflow: hidden;
        padding: 0;
        position: absolute;
        width: 1px;
    }
    .styled-table tr {
        display: block;
        margin-bottom: 1.5rem;
        border-radius: var(--border-radius);
        box-shadow: var(--shadow);
        border-bottom: none;
    }
    .styled-table td {
        display: block;
        text-align: right;
        padding: 0.75rem 1rem;
        border-bottom: 1px solid var(--border-color-light);
    }
    .styled-table td::before {
        content: attr(data-label);
        float: left;
        font-weight: bold;
        text-transform: uppercase;
        font-size: 0.75rem;
        color: var(--color-text-light);
    }
    .styled-table td:last-child {
        border-bottom: 0;
    }
    .actions-group {
        justify-content: flex-start;
        padding-top: 1rem;
    }

    .form-actions {
        flex-direction: column-reverse;
        align-items: stretch;
}
    }