/* ========================================
   Artist Manager Pro - Modern Design CSS
   ======================================== */

:root {
    --primary-color: #6366f1;
    --primary-dark: #4f46e5;
    --secondary-color: #4f46e5;
    --accent-color: #ec4899;
    --success-color: #10b981;
    --warning-color: #f59e0b;
    --error-color: #ef4444;
    --info-color: #3b82f6;
    --text-color: #1f2937;
    --text-light: #6b7280;
    --text-lighter: #9ca3af;
    --bg-color: #ffffff;
    --bg-light: #f9fafb;
    --bg-lighter: #f3f4f6;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    color: var(--text-color);
    background-color: var(--bg-light);
    line-height: 1.6;
    font-size: 15px;
}

h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    margin-bottom: 1rem;
    color: var(--text-color);
}

h1 {
    font-size: 2.5rem;
}

h2 {
    font-size: 2rem;
}

h3 {
    font-size: 1.5rem;
}

h4 {
    font-size: 1.25rem;
}

h5 {
    font-size: 1.125rem;
}

h6 {
    font-size: 1rem;
}

p {
    margin-bottom: 1rem;
    color: var(--text-light);
}

a {
    color: var(--primary-color);
    text-decoration: none;
    transition: all 0.3s ease;
    font-weight: 500;
}

a:hover {
    color: var(--primary-dark);
}

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

.page-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

header {
    background: var(--bg-color);
    border-bottom: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    position: sticky;
    top: 0;
    z-index: 100;
}

nav {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 0;
    gap: 2rem;
}

.logo {
    font-size: 1.5rem;
    font-weight: 800;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
    list-style: none;
    align-items: center;
    flex-wrap: wrap;
}

.nav-links a {
    color: var(--text-color);
    font-weight: 600;
    transition: all 0.3s ease;
}

.nav-links a:hover {
    color: var(--primary-color);
}

button, .btn, input[type="submit"], input[type="button"] {
    padding: 0.625rem 1.25rem;
    border: none;
    border-radius: 0.5rem;
    cursor: pointer;
    font-size: 0.95rem;
    font-weight: 600;
    transition: all 0.3s ease;
    text-decoration: none;
    display: inline-block;
    text-align: center;
    box-shadow: var(--shadow-sm);
}

.btn-primary {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    border: none;
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--bg-color);
    color: var(--primary-color);
    border: 2px solid var(--border-color);
}

.btn-secondary:hover {
    border-color: var(--primary-color);
    background-color: var(--bg-lighter);
}

.btn-accent {
    background: linear-gradient(135deg, #ec4899 0%, #db2777 100%);
    color: white;
}

.btn-accent:hover {
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px);
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-large {
    padding: 0.875rem 2rem;
    font-size: 1.05rem;
}

.btn-danger {
    background-color: var(--error-color);
    color: white;
}

.btn-danger:hover {
    background-color: #dc2626;
}

.btn-success {
    background-color: var(--success-color);
    color: white;
}

.btn-success:hover {
    background-color: #059669;
}

button:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

form {
    display: flex;
    flex-direction: column;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.form-row.full {
    grid-template-columns: 1fr;
}

label {
    display: block;
    margin-bottom: 0.625rem;
    font-weight: 600;
    color: var(--text-color);
}

label .required {
    color: var(--error-color);
    margin-left: 0.25rem;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="file"],
textarea,
select {
    width: 100%;
    padding: 0.875rem 1rem;
    border: 2px solid var(--border-color);
    border-radius: 0.5rem;
    font-size: 0.95rem;
    font-family: inherit;
    background-color: var(--bg-color);
    color: var(--text-color);
    transition: all 0.3s ease;
}

input[type="text"]:focus,
input[type="email"]:focus,
input[type="password"]:focus,
input[type="number"]:focus,
input[type="tel"]:focus,
input[type="url"]:focus,
input[type="date"]:focus,
input[type="file"]:focus,
textarea:focus,
select:focus {
    outline: none;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

textarea {
    resize: vertical;
    min-height: 120px;
}

input[type="checkbox"],
input[type="radio"] {
    cursor: pointer;
    margin-right: 0.625rem;
}

.form-error {
    color: var(--error-color);
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

.form-help {
    color: var(--text-lighter);
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

.form-success {
    color: var(--success-color);
    font-size: 0.875rem;
    margin-top: 0.375rem;
}

.alert {
    padding: 1rem 1.5rem;
    border-radius: 0.5rem;
    margin-bottom: 1.5rem;
    display: flex;
    gap: 1rem;
    align-items: flex-start;
    border-left: 4px solid;
}

.alert-success {
    background-color: #ecfdf5;
    border-left-color: var(--success-color);
    color: #047857;
}

.alert-error {
    background-color: #fef2f2;
    border-left-color: var(--error-color);
    color: #7f1d1d;
}

.alert-warning {
    background-color: #fffbeb;
    border-left-color: var(--warning-color);
    color: #78350f;
}

.alert-info {
    background-color: #eff6ff;
    border-left-color: var(--info-color);
    color: #0c2340;
}

.alert-close {
    cursor: pointer;
    font-weight: bold;
    opacity: 0.6;
    margin-left: auto;
}

.alert-close:hover {
    opacity: 1;
}

.card {
    background: var(--bg-color);
    border-radius: 0.75rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.card-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-light);
    background: linear-gradient(135deg, #f9fafb 0%, #f3f4f6 100%);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    background: var(--bg-lighter);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
    flex-wrap: wrap;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: var(--bg-color);
}

th {
    background: var(--bg-lighter);
    padding: 1rem;
    text-align: left;
    font-weight: 600;
    border-bottom: 2px solid var(--border-color);
    color: var(--text-color);
}

td {
    padding: 1rem;
    border-bottom: 1px solid var(--border-light);
}

tr:hover {
    background: var(--bg-lighter);
}

.table-responsive {
    overflow-x: auto;
}

.modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    align-items: center;
    justify-content: center;
}

.modal.active {
    display: flex;
}

.modal-content {
    background: var(--bg-color);
    border-radius: 0.75rem;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
}

.modal-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: var(--text-light);
}

.modal-close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 1.5rem;
}

.modal-footer {
    padding: 1.5rem;
    border-top: 1px solid var(--border-color);
    display: flex;
    justify-content: flex-end;
    gap: 1rem;
}

.grid {
    display: grid;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
}

.grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
}

.grid-4 {
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.sidebar-layout {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.sidebar {
    background: var(--bg-color);
    border-radius: 0.75rem;
    padding: 1.5rem;
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-sm);
}

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

.sidebar-menu a {
    display: block;
    padding: 0.875rem 1rem;
    color: var(--text-color);
    border-radius: 0.5rem;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background: var(--bg-lighter);
    color: var(--primary-color);
    border-left-color: var(--primary-color);
}

main {
    flex: 1;
    padding: 2rem 0;
}

.page-title {
    margin-bottom: 2rem;
}

.page-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    flex-wrap: wrap;
}

footer {
    background: var(--bg-color);
    border-top: 1px solid var(--border-color);
    padding: 3rem 0 1.5rem;
    margin-top: 4rem;
    color: var(--text-light);
}

footer .container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
    margin-bottom: 2rem;
}

footer h4 {
    margin-bottom: 1rem;
    color: var(--text-color);
}

footer a {
    display: block;
    margin-bottom: 0.75rem;
    color: var(--text-light);
}

footer a:hover {
    color: var(--primary-color);
}

.badge {
    display: inline-block;
    padding: 0.375rem 0.875rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}

.badge-primary {
    background: #dbeafe;
    color: #0c2340;
}

.badge-success {
    background: #d1fae5;
    color: #065f46;
}

.badge-danger {
    background: #fee2e2;
    color: #991b1b;
}

.badge-warning {
    background: #fef3c7;
    color: #78350f;
}

.text-center {
    text-align: center;
}

.text-right {
    text-align: right;
}

.text-muted {
    color: var(--text-light);
}

.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 1.5rem; }
.mt-4 { margin-top: 2rem; }

.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.mb-3 { margin-bottom: 1.5rem; }
.mb-4 { margin-bottom: 2rem; }

.py-1 { padding-top: 0.5rem; padding-bottom: 0.5rem; }
.py-2 { padding-top: 1rem; padding-bottom: 1rem; }
.py-3 { padding-top: 1.5rem; padding-bottom: 1.5rem; }
.py-4 { padding-top: 2rem; padding-bottom: 2rem; }

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.rounded {
    border-radius: 0.5rem;
}

.shadow {
    box-shadow: var(--shadow-md);
}

.loading {
    opacity: 0.6;
    pointer-events: none;
}

.spinner {
    display: inline-block;
    width: 1.25rem;
    height: 1.25rem;
    border: 2.5px solid var(--border-color);
    border-top: 2.5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

.pagination {
    display: flex;
    gap: 0.5rem;
    margin-top: 2rem;
    justify-content: center;
    flex-wrap: wrap;
}

.pagination a,
.pagination span {
    padding: 0.625rem 0.875rem;
    border: 1px solid var(--border-color);
    border-radius: 0.375rem;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-weight: 500;
}

.pagination a:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--bg-lighter);
}

.pagination .active {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.hero {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: white;
    padding: 5rem 2rem;
    text-align: center;
}

.hero h1 {
    color: white;
    margin-bottom: 1rem;
}

.hero p {
    color: rgba(255, 255, 255, 0.9);
    font-size: 1.25rem;
    margin-bottom: 2rem;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }
    
    .sidebar-layout {
        grid-template-columns: 1fr;
    }
    
    .nav-links {
        gap: 1rem;
    }
    
    h1 { font-size: 1.75rem; }
    h2 { font-size: 1.5rem; }
    h3 { font-size: 1.25rem; }
    
    .grid-2,
    .grid-3,
    .grid-4 {
        grid-template-columns: 1fr;
    }
    
    .hero {
        padding: 3rem 1.5rem;
    }
    
    footer .container {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 1rem;
    }
    
    nav {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav-links {
        width: 100%;
        justify-content: center;
    }
    
    h1 { font-size: 1.5rem; }
    h2 { font-size: 1.25rem; }
}
