/*
 * CUSTOM PREMIUM ADMIN THEME - PT MULTI SERVICE TEKNIK
 * Branding Colors:
 * Primary Deep Blue: #1e3a8a
 * Secondary Bright Blue: #3b82f6
 * Accent Amber/Gold: #f59e0b
 */

/* Import Outfit or Inter Font */
@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;600;700;800&display=swap');

body, input, select, textarea, button {
    font-family: 'Outfit', sans-serif !important;
}

/* 1. Header & Navigation Brand Styling */
#header {
    background: #1e3a8a !important; /* Deep Corporate Blue */
    padding: 12px 24px !important;
    border-bottom: 2px solid #f59e0b !important; /* Amber Gold line */
}

#header a {
    color: #ffffff !important;
}

#header a:hover {
    color: #f59e0b !important;
}

#branding h1 {
    font-weight: 700 !important;
    font-size: 1.25rem !important;
}

div.breadcrumbs {
    background: #f3f4f6 !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 10px 40px !important;
    font-size: 0.85rem !important;
}

div.breadcrumbs a {
    color: #3b82f6 !important;
    font-weight: 500 !important;
}

div.breadcrumbs a:hover {
    text-decoration: underline !important;
}

/* 2. Login Page Revamp */
body.login {
    background: linear-gradient(135deg, #0f172a 0%, #1e3a8a 100%) !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    min-height: 100vh !important;
}

#login-logo-container {
    text-align: center;
    margin-bottom: 24px;
}

#login-logo-container img {
    height: 75px;
    width: 75px;
    border-radius: 50%;
    border: 3px solid #f59e0b;
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.2);
    background: #ffffff;
    padding: 2px;
}

.login #content-main {
    width: 100% !important;
    max-width: 420px !important;
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(8px) !important;
    border-radius: 24px !important;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
    padding: 40px !important;
    box-sizing: border-box !important;
    border: 1px solid rgba(255, 255, 255, 0.2) !important;
}

.login h1 {
    display: none !important; /* Hide original raw Django header */
}

/* Add custom title above form via CSS or JS, or simply style the form container */
.login #content-main::before {
    content: "Admin Panel PT MST" !important;
    display: block !important;
    text-align: center !important;
    font-size: 1.6rem !important;
    font-weight: 800 !important;
    color: #1e3a8a !important;
    margin-bottom: 8px !important;
    letter-spacing: -0.5px !important;
}

.login #content-main::after {
    content: "Silakan masuk untuk mengelola website" !important;
    display: block !important;
    text-align: center !important;
    font-size: 0.85rem !important;
    font-weight: 500 !important;
    color: #6b7280 !important;
    margin-bottom: 28px !important;
}

.login .form-row {
    padding: 0 !important;
    margin-bottom: 20px !important;
    border: none !important;
}

.login label {
    font-weight: 600 !important;
    font-size: 0.85rem !important;
    color: #4b5563 !important;
    margin-bottom: 6px !important;
    text-transform: uppercase !important;
    letter-spacing: 0.5px !important;
}

.login input[type="text"], .login input[type="password"] {
    width: 100% !important;
    box-sizing: border-box !important;
    padding: 12px 16px !important;
    border-radius: 12px !important;
    border: 1px solid #d1d5db !important;
    background: #f9fafb !important;
    font-size: 0.95rem !important;
    transition: all 0.2s ease !important;
}

.login input[type="text"]:focus, .login input[type="password"]:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15) !important;
    outline: none !important;
}

.login .submit-row {
    padding: 0 !important;
    margin-top: 24px !important;
    text-align: center !important;
    border: none !important;
    background: transparent !important;
}

.login .submit-row input {
    width: 100% !important;
    background: #1e3a8a !important;
    color: white !important;
    padding: 14px 20px !important;
    border-radius: 12px !important;
    font-weight: 700 !important;
    font-size: 1rem !important;
    border: none !important;
    cursor: pointer !important;
    box-shadow: 0 4px 6px -1px rgba(30, 58, 138, 0.3) !important;
    transition: all 0.2s ease !important;
}

.login .submit-row input:hover {
    background: #3b82f6 !important;
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3) !important;
    transform: translateY(-1px) !important;
}

/* 3. Forms UI Modernization */
.module {
    border-radius: 16px !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05), 0 2px 4px -1px rgba(0, 0, 0, 0.03) !important;
    border: 1px solid #e5e7eb !important;
    overflow: hidden !important;
    background: #ffffff !important;
    margin-bottom: 24px !important;
}

.module h2 {
    background: #1e3a8a !important;
    color: #ffffff !important;
    font-weight: 700 !important;
    padding: 12px 20px !important;
    font-size: 1rem !important;
}

.form-row {
    padding: 16px 20px !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

.form-row label {
    font-weight: 600 !important;
    color: #374151 !important;
    font-size: 0.9rem !important;
}

.form-row input[type="text"], .form-row input[type="email"], .form-row input[type="number"], .form-row textarea, .form-row select {
    border-radius: 10px !important;
    border: 1px solid #d1d5db !important;
    padding: 10px 14px !important;
    font-size: 0.9rem !important;
    background: #f9fafb !important;
    transition: all 0.2s ease !important;
    max-width: 600px !important;
}

.form-row input[type="text"]:focus, .form-row input[type="email"]:focus, .form-row textarea:focus, .form-row select:focus {
    border-color: #3b82f6 !important;
    background: #ffffff !important;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15) !important;
    outline: none !important;
}

.form-row .help {
    color: #9ca3af !important;
    font-size: 0.78rem !important;
    margin-top: 6px !important;
    font-style: italic !important;
}

/* 4. Action Buttons Styling */
.submit-row {
    background: #f9fafb !important;
    border: 1px solid #e5e7eb !important;
    border-radius: 12px !important;
    padding: 16px 24px !important;
    margin-top: 24px !important;
}

.submit-row a.deletelink {
    background: #ef4444 !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 10px 18px !important;
    font-weight: 600 !important;
    height: auto !important;
    line-height: normal !important;
    transition: background 0.2s !important;
}

.submit-row a.deletelink:hover {
    background: #dc2626 !important;
}

.submit-row input[name="_save"] {
    background: #1e3a8a !important;
    border-radius: 8px !important;
    padding: 10px 20px !important;
    font-weight: 700 !important;
    color: white !important;
    transition: background 0.2s !important;
    border: none !important;
    cursor: pointer !important;
}

.submit-row input[name="_save"]:hover {
    background: #3b82f6 !important;
}

.submit-row input[name="_addanother"], .submit-row input[name="_continue"] {
    background: #f3f4f6 !important;
    border: 1px solid #d1d5db !important;
    color: #374151 !important;
    border-radius: 8px !important;
    padding: 10px 16px !important;
    font-weight: 600 !important;
    transition: all 0.2s !important;
    cursor: pointer !important;
}

.submit-row input[name="_addanother"]:hover, .submit-row input[name="_continue"]:hover {
    background: #e5e7eb !important;
    color: #111827 !important;
}

/* 5. List View Table Polish */
#changelist {
    border-radius: 16px !important;
    border: 1px solid #e5e7eb !important;
    overflow: hidden !important;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.05) !important;
}

#changelist table {
    width: 100% !important;
}

#changelist table thead th {
    background: #f3f4f6 !important;
    border-bottom: 2px solid #e5e7eb !important;
    padding: 12px 16px !important;
    font-weight: 700 !important;
    color: #374151 !important;
}

#changelist table tbody tr {
    transition: background 0.2s !important;
}

#changelist table tbody tr:hover {
    background: #f8fafc !important;
}

#changelist table tbody td, #changelist table tbody th {
    padding: 14px 16px !important;
    border-bottom: 1px solid #f3f4f6 !important;
}

/* Search bar and Filters */
#changelist-search {
    background: #f9fafb !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 16px 20px !important;
}

#changelist-search input[type="text"] {
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
    padding: 8px 12px !important;
    font-size: 0.88rem !important;
    max-width: 300px !important;
}

#changelist-search input[type="submit"] {
    background: #1e3a8a !important;
    color: white !important;
    border-radius: 8px !important;
    padding: 8px 16px !important;
    font-weight: 600 !important;
    font-size: 0.88rem !important;
    border: none !important;
    cursor: pointer !important;
    margin-left: 8px !important;
    transition: background 0.2s !important;
}

#changelist-search input[type="submit"]:hover {
    background: #3b82f6 !important;
}

/* Action dropdowns */
#changelist .actions {
    background: #ffffff !important;
    border-bottom: 1px solid #e5e7eb !important;
    padding: 12px 20px !important;
    font-size: 0.85rem !important;
}

#changelist .actions select {
    border-radius: 6px !important;
    border: 1px solid #d1d5db !important;
    padding: 4px 8px !important;
}

#changelist .actions button {
    background: #4b5563 !important;
    color: white !important;
    border-radius: 6px !important;
    padding: 5px 12px !important;
    font-weight: 600 !important;
    border: none !important;
    cursor: pointer !important;
    transition: background 0.2s !important;
}

#changelist .actions button:hover {
    background: #1f2937 !important;
}

/* Sidebar filters title */
#changelist-filter {
    border-left: 1px solid #e5e7eb !important;
    background: #f9fafb !important;
}

#changelist-filter h2 {
    background: #1e3a8a !important;
    color: white !important;
    font-weight: 700 !important;
    padding: 12px 16px !important;
}

/* Image preview thumbnail inside change form and list view */
.admin-img-preview {
    border-radius: 8px !important;
    border: 1px solid #d1d5db !important;
    box-shadow: 0 2px 4px rgba(0,0,0,0.05) !important;
    background: #ffffff !important;
    max-width: 100px !important;
    max-height: 100px !important;
    object-fit: cover !important;
}

/* Custom buttons on dashboard */
.admin-card a.admin-btn:hover {
    transform: scale(1.02) !important;
    opacity: 0.95 !important;
}

.advanced-section details summary:hover {
    color: #1e3a8a !important;
}

.advanced-section .btn-adv:hover {
    background: #1f2937 !important;
    transform: translateY(-1px) !important;
}
