/* PSK DMS - Main Stylesheet */
:root {
    --primary: #2563eb;
    --secondary: #64748b;
    --success: #10b981;
    --warning: #f59e0b;
    --danger: #ef4444;
    --light: #f8fafc;
    --dark: #0f172a;
    --border: #e2e8f0;
    --gray: #94a3b8;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #ffffff;
    color: var(--dark);
}

body {
    display: flex;
    flex-direction: column;
}

main {
    flex: 1;
    padding: 2rem 0;
}

.max {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Header */
#header {
    background: var(--dark);
    color: white;
    padding: 1rem 0;
    border-bottom: 1px solid var(--border);
}

#header .header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

#header .logo {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: white;
    text-decoration: none;
    font-weight: 600;
}

#header .logo img {
    width: 40px;
    height: 40px;
}

#header .nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

#header .navigation ul {
    display: flex;
    list-style: none;
    gap: 1rem;
}

#header .navigation a {
    color: var(--gray);
    text-decoration: none;
    transition: color 0.3s;
}

#header .navigation a.active {
    color: var(--primary);
}

/* Footer */
#footer {
    background: var(--light);
    border-top: 1px solid var(--border);
    padding: 2rem 0;
    margin-top: auto;
}

#footer .footer {
    text-align: center;
    color: var(--gray);
}

/* Forms */
.form-group {
    margin-bottom: 1rem;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-family: inherit;
    font-size: 1rem;
}

.form-group textarea {
    min-height: 150px;
    resize: vertical;
}

/* Buttons */
.btn {
    padding: 0.75rem 1.5rem;
    background: var(--primary);
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 1rem;
    text-decoration: none;
    display: inline-block;
    transition: background 0.3s;
}

.btn:hover {
    background: #1d4ed8;
}

.btn-small {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
}

.btn-danger {
    background: var(--danger);
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-success {
    background: var(--success);
}

.btn-success:hover {
    background: #059669;
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 2rem;
}

.admin-table thead {
    background: var(--light);
}

.admin-table th,
.admin-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.admin-table th {
    font-weight: 600;
    color: var(--dark);
}

.admin-table tbody tr:hover {
    background: var(--light);
}

/* Alerts */
.alert {
    padding: 1rem;
    border-radius: 0.375rem;
    margin-bottom: 1rem;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border: 1px solid #a7f3d0;
}

.alert-danger {
    background: #fee2e2;
    color: #991b1b;
    border: 1px solid #fecaca;
}

.alert-info {
    background: #dbeafe;
    color: #0c2340;
    border: 1px solid #bfdbfe;
}

/* Lists */
.list-item {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    transition: background 0.3s;
}

.list-item:hover {
    background: var(--light);
}

.list-item h3 {
    margin-bottom: 0.5rem;
}

.list-item small {
    color: var(--gray);
}

/* Auth page */
.authPage {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: linear-gradient(135deg, var(--primary), #7c3aed);
}

.authBefore {
    position: absolute;
    left: 0;
    top: 0;
    width: 50%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
}

.authBefore img {
    max-width: 300px;
    opacity: 0.8;
}

.authView {
    width: 100%;
    max-width: 500px;
    z-index: 10;
}

.authViewForm {
    background: white;
    border-radius: 0.75rem;
    padding: 2rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
}

.authtabs {
    display: flex;
    gap: 1rem;
    list-style: none;
    border-bottom: 2px solid var(--border);
    margin-bottom: 2rem;
}

.authtabs li {
    cursor: pointer;
    padding: 0.75rem 0;
    color: var(--gray);
    transition: color 0.3s;
}

.authtabs li.active,
.authtabs li:hover {
    color: var(--primary);
    border-bottom: 2px solid var(--primary);
    margin-bottom: -2px;
}

.form-item {
    margin-bottom: 1.5rem;
}

.form-item label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 500;
    color: var(--dark);
}

.form-item input {
    width: 100%;
    padding: 0.75rem;
    border: 1px solid var(--border);
    border-radius: 0.375rem;
    font-size: 1rem;
}

.formItem.submit button {
    width: 100%;
}

/* Projects page */
.projectsView .projectsContent {
    display: grid;
    grid-template-columns: 250px 1fr;
    gap: 2rem;
}

.pc_sidebar {
    background: var(--light);
    border-radius: 0.375rem;
    padding: 1.5rem;
}

.pc_sidebar .title h2 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
}

.projectItem {
    padding: 1rem;
    border-bottom: 1px solid var(--border);
    cursor: pointer;
    transition: background 0.3s;
}

.projectItem:hover {
    background: white;
}

.projectItem .title {
    font-weight: 600;
    margin-bottom: 0.25rem;
}

.projectItem .info {
    font-size: 0.875rem;
    color: var(--gray);
}

.empty_project {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    color: var(--gray);
    font-size: 1.125rem;
}

/* Responsive */
@media (max-width: 768px) {
    .projectsView .projectsContent {
        grid-template-columns: 1fr;
    }

    .authBefore {
        display: none;
    }

    #header .nav {
        flex-direction: column;
        gap: 1rem;
    }
}

