/* Classic Admin Panel Styles - phpMyAdmin/Old WordPress Style */

/* Reset and base styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-size: 12px;
    background-color: #f0f0f0;
    color: #333;
    line-height: 1.4;
}

body, input, textarea, select {
    font-family: Arial, Helvetica, sans-serif;
}

/* Classic top header */
.admin-header {
    background: #2c5aa0;
    background: linear-gradient(to bottom, #2c5aa0 0%, #1a3f75 100%);
    color: white;
    padding: 8px 15px;
    border-bottom: 2px solid #1a3f75;
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 45px;
}

.admin-header-left h1 {
    font-size: 16px;
    font-weight: bold;
    margin: 0;
}

.admin-header-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-user {
    font-size: 11px;
    color: #cccccc;
}

.header-link {
    color: #ffffff;
    text-decoration: none;
    font-size: 11px;
    padding: 4px 8px;
    background: rgba(255,255,255,0.1);
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 2px;
}

.header-link:hover {
    background: rgba(255,255,255,0.2);
    text-decoration: underline;
}

/* Classic navigation tabs */
.admin-nav-tabs {
    background: #e8e8e8;
    background: linear-gradient(to bottom, #f5f5f5 0%, #e8e8e8 100%);
    border-bottom: 1px solid #cccccc;
    padding: 0;
    overflow-x: auto;
    overflow-y: hidden;
    white-space: nowrap;
}

.nav-tab {
    display: inline-block;
    padding: 8px 12px;
    background: #d4d4d4;
    background: linear-gradient(to bottom, #f0f0f0 0%, #d4d4d4 100%);
    border: 1px solid #aaaaaa;
    border-bottom: none;
    margin-right: 2px;
    text-decoration: none;
    color: #333333;
    font-size: 11px;
    font-weight: bold;
    position: relative;
    top: 1px;
}

.nav-tab:hover {
    background: #e0e0e0;
    background: linear-gradient(to bottom, #f8f8f8 0%, #e0e0e0 100%);
}

.nav-tab.active {
    background: #ffffff;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f8f8 100%);
    border-bottom: 1px solid #ffffff;
    color: #000000;
}

/* Content container */
.admin-container {
    padding: 15px;
    max-width: 1200px;
    margin: 0 auto;
}

.admin-content {
    background: #ffffff;
    border: 1px solid #cccccc;
    min-height: 500px;
}

/* Page header */
.page-header {
    background: #f8f8f8;
    background: linear-gradient(to bottom, #ffffff 0%, #f0f0f0 100%);
    border-bottom: 1px solid #dddddd;
    padding: 12px 15px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.page-header h2 {
    font-size: 14px;
    font-weight: bold;
    color: #333333;
    margin: 0;
    flex-grow: 1;
}

.page-actions {
    display: flex;
    gap: 8px;
}

/* Classic tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 11px;
    margin: 0;
}

.admin-table th {
    background: #d4d4d4;
    background: linear-gradient(to bottom, #e8e8e8 0%, #d4d4d4 100%);
    border: 1px solid #aaaaaa;
    padding: 6px 8px;
    text-align: left;
    font-weight: bold;
    color: #333333;
    white-space: nowrap;
}

.admin-table td {
    border: 1px solid #dddddd;
    padding: 6px 8px;
    background: #ffffff;
    vertical-align: top;
}

.admin-table tr:nth-child(even) td {
    background: #f8f8f8;
}

.admin-table tr:hover td {
    background: #ffffcc;
}

.admin-table img {
    max-width: 50px;
    max-height: 50px;
    border: 1px solid #cccccc;
}

/* Classic forms */
.admin-form {
    padding: 15px;
    background: #ffffff;
}

.admin-form h2 {
    font-size: 14px;
    font-weight: bold;
    margin-bottom: 15px;
    padding-bottom: 8px;
    border-bottom: 1px solid #dddddd;
    color: #333333;
}

.form-group {
    margin-bottom: 12px;
}

.form-label {
    display: block;
    margin-bottom: 3px;
    font-weight: bold;
    font-size: 11px;
    color: #333333;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 4px 6px;
    border: 1px solid #aaaaaa;
    background: #ffffff;
    font-size: 11px;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    border-color: #2c5aa0;
    outline: none;
    background: #ffffcc;
}

.form-textarea {
    min-height: 80px;
    resize: vertical;
}

.form-file {
    border: 1px solid #aaaaaa;
    padding: 8px;
    background: #f8f8f8;
}

/* Classic buttons */
.btn {
    display: inline-block;
    padding: 4px 8px;
    font-size: 11px;
    text-decoration: none;
    border: 1px solid #aaaaaa;
    background: #e8e8e8;
    background: linear-gradient(to bottom, #f0f0f0 0%, #e0e0e0 100%);
    color: #333333;
    cursor: pointer;
    margin-right: 4px;
    margin-bottom: 4px;
}

.btn:hover {
    background: #f0f0f0;
    background: linear-gradient(to bottom, #f8f8f8 0%, #e8e8e8 100%);
    text-decoration: none;
}

.btn:active {
    background: #d0d0d0;
    background: linear-gradient(to bottom, #d8d8d8 0%, #c8c8c8 100%);
}

.btn-primary {
    background: #4a90e2;
    background: linear-gradient(to bottom, #5ba0f0 0%, #4080d0 100%);
    color: #ffffff;
    border-color: #3070c0;
    font-weight: bold;
}

.btn-primary:hover {
    background: #5ba0f0;
    background: linear-gradient(to bottom, #6bb0ff 0%, #4a90e2 100%);
}

.btn-danger {
    background: #d9534f;
    background: linear-gradient(to bottom, #e9635f 0%, #c9433f 100%);
    color: #ffffff;
    border-color: #b9333f;
}

.btn-danger:hover {
    background: #e9635f;
    background: linear-gradient(to bottom, #f9736f 0%, #d9534f 100%);
}

.btn-edit {
    background: #5cb85c;
    background: linear-gradient(to bottom, #6cc86c 0%, #4ca84c 100%);
    color: #ffffff;
    border-color: #4a964a;
}

.btn-edit:hover {
    background: #6cc86c;
    background: linear-gradient(to bottom, #7cd87c 0%, #5cb85c 100%);
}

.btn-small {
    padding: 2px 6px;
    font-size: 10px;
}

/* Action buttons in tables */
.action-buttons {
    white-space: nowrap;
}

.action-buttons .btn {
    margin-right: 2px;
    margin-bottom: 2px;
}

/* Messages */
.admin-message {
    padding: 8px 12px;
    margin: 10px 15px;
    border: 1px solid;
    font-size: 11px;
}

.admin-message.success {
    background: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.admin-message.error {
    background: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

/* Form grid for settings pages */
.form-grid {
    display: table;
    width: 100%;
}

.form-grid .form-group {
    display: table-row;
}

.form-grid .form-label {
    display: table-cell;
    width: 150px;
    padding-right: 10px;
    vertical-align: top;
    padding-top: 6px;
}

.form-grid .form-input,
.form-grid .form-textarea,
.form-grid .form-select {
    display: table-cell;
    width: auto;
}

/* Dashboard stats boxes */
.stats-grid {
    display: table;
    width: 100%;
    border-collapse: separate;
    border-spacing: 10px;
}

.stat-box {
    display: table-cell;
    background: #f8f8f8;
    border: 1px solid #dddddd;
    padding: 12px;
    text-align: center;
    width: 25%;
}

.stat-number {
    font-size: 18px;
    font-weight: bold;
    color: #2c5aa0;
    display: block;
}

.stat-label {
    font-size: 10px;
    color: #666666;
    text-transform: uppercase;
}

/* Upload area */
.upload-area {
    border: 2px dashed #cccccc;
    padding: 20px;
    text-align: center;
    background: #f8f8f8;
    margin: 10px 0;
}

.upload-area:hover {
    border-color: #2c5aa0;
    background: #f0f8ff;
}

/* Media library grid */
.media-grid {
    display: table;
    width: 100%;
}

.media-item {
    display: table-cell;
    width: 150px;
    padding: 10px;
    text-align: center;
    border: 1px solid #dddddd;
    margin: 5px;
    background: #ffffff;
}

.media-item img {
    max-width: 120px;
    max-height: 120px;
    border: 1px solid #cccccc;
}

.media-item-name {
    font-size: 10px;
    margin-top: 5px;
    word-break: break-all;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 8px;
    }
    
    .admin-nav-tabs {
        overflow-x: scroll;
    }
    
    .form-grid .form-label,
    .form-grid .form-input,
    .form-grid .form-textarea,
    .form-grid .form-select {
        display: block;
        width: 100%;
    }
    
    .stats-grid {
        display: block;
    }
    
    .stat-box {
        display: block;
        width: 100%;
        margin-bottom: 10px;
    }
}

/* Upload preview styles */
.upload-preview {
    margin-top: 15px;
    padding: 10px;
    border: 1px solid #cccccc;
    background: #f9f9f9;
}

.upload-preview img {
    max-width: 300px;
    max-height: 200px;
    width: auto;
    height: auto;
    border: 1px solid #cccccc;
    display: block;
}
