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

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

body {
    font-family: 'Poppins', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: #0d1117;
    min-height: 100vh;
    padding: 0;
    margin: 0;
    color: #c9d1d9;
}

/* Layout con Sidebar */
.layout-wrapper {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background: #0a0e27;
    box-shadow: 2px 0 20px rgba(0, 217, 255, 0.2);
    position: fixed;
    left: 0;
    top: 0;
    height: 100vh;
    overflow-y: auto;
    z-index: 1000;
    border-right: 1px solid rgba(0, 217, 255, 0.3);
}

.sidebar-header {
    display: none;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.sidebar-nav {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 100vh;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #e6edf3;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(0, 217, 255, 0.1);
    padding-left: 25px;
    border-left-color: #00d9ff;
    color: #00d9ff;
    box-shadow: inset 0 0 20px rgba(0, 217, 255, 0.2);
}

.sidebar-nav a.active {
    background: linear-gradient(90deg, rgba(0, 217, 255, 0.2) 0%, transparent 100%);
    color: #00d9ff;
    font-weight: 600;
    border-left-color: #00d9ff;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.sidebar-nav .icon {
    font-size: 1.4em;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.sidebar-menu li {
    margin: 5px 0;
}

.sidebar-menu a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: #e6edf3;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.sidebar-menu a:hover {
    background: rgba(0, 217, 255, 0.1);
    padding-left: 25px;
    border-left-color: #00d9ff;
    color: #00d9ff;
    box-shadow: inset 0 0 20px rgba(0, 217, 255, 0.2);
}

.sidebar-menu li.active a {
    background: linear-gradient(90deg, rgba(0, 217, 255, 0.2) 0%, transparent 100%);
    color: #00d9ff;
    font-weight: 600;
    border-left-color: #00d9ff;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.sidebar-menu .icon {
    font-size: 1.4em;
    margin-right: 15px;
    width: 30px;
    text-align: center;
}

.sidebar-menu .text {
    flex: 1;
    font-size: 0.95em;
}

/* Submenu rimosso */

/* Main Content */
.main-content {
    margin-left: 260px;
    flex: 1;
    min-height: 100vh;
}

.container {
    background: #161b22;
    border-radius: 0;
    box-shadow: none;
}

header {
    background: linear-gradient(135deg, #00d9ff 0%, #0088cc 100%);
    color: white;
    padding: 40px 50px;
    border-bottom: 5px solid rgba(0, 217, 255, 0.3);
    box-shadow: 0 4px 20px rgba(0, 217, 255, 0.3);
}

header h1 {
    font-size: 2.2em;
    font-weight: 700;
    margin: 0;
    text-shadow: 0 0 20px rgba(0, 217, 255, 0.6), 0 0 30px rgba(0, 217, 255, 0.4);
}

.subtitle {
    opacity: 0.95;
    font-size: 1em;
    margin-top: 8px;
    font-weight: 300;
}

.actions-bar {
    padding: 25px 50px;
    background: #0d1117;
    border-bottom: 2px solid rgba(0, 217, 255, 0.2);
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    align-items: center;
    box-shadow: 0 2px 8px rgba(0, 217, 255, 0.1);
}

.search-form {
    display: flex;
    gap: 10px;
    flex: 1;
    min-width: 300px;
    margin-left: auto;
}

.search-form input {
    flex: 1;
    padding: 12px 18px;
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s;
    background: #161b22;
    color: #c9d1d9;
}

.search-form input:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 0 3px rgba(0, 217, 255, 0.2), 0 0 15px rgba(0, 217, 255, 0.3);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.btn-primary {
    background: linear-gradient(135deg, #00d9ff 0%, #0088cc 100%);
    color: white;
    border: 1px solid rgba(0, 217, 255, 0.5);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 20px rgba(0, 217, 255, 0.6), 0 4px 20px rgba(0, 217, 255, 0.4);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-secondary:hover {
    background: #5a6268;
    transform: translateY(-2px);
}

.btn-search {
    background: #009246;
    color: white;
    border: 1px solid rgba(0, 146, 70, 0.5);
}

.btn-search:hover {
    background: #007a3d;
    transform: translateY(-2px);
    box-shadow: 0 0 15px rgba(0, 146, 70, 0.5), 0 4px 15px rgba(0, 146, 70, 0.3);
}

.btn-add {
    background: #17a2b8;
    color: white;
    margin-top: 15px;
}

.btn-add:hover {
    background: #138496;
}

.empty-state {
    text-align: center;
    padding: 100px 40px;
}

.empty-state p {
    font-size: 1.3em;
    color: #6c757d;
    margin-bottom: 25px;
}

.stats {
    padding: 25px 50px;
    background: #0d1117;
    border-bottom: 2px solid rgba(0, 217, 255, 0.2);
    display: flex;
    gap: 40px;
    flex-wrap: wrap;
}

.stat-item {
    color: #e6edf3;
    font-size: 1em;
}

.stat-item strong {
    color: #00d9ff;
    font-size: 1.3em;
    font-weight: 700;
    text-shadow: 0 0 10px rgba(0, 217, 255, 0.5);
}

.parole-table {
    width: 100%;
    border-collapse: collapse;
    background: #161b22;
}

.parole-table thead {
    background: rgba(0, 217, 255, 0.1);
    border-bottom: 2px solid rgba(0, 217, 255, 0.3);
}

.parole-table th,
.parole-table td {
    padding: 18px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(0, 217, 255, 0.1);
    color: #c9d1d9;
}

.parole-table th {
    font-weight: 700;
    color: #00d9ff;
    font-size: 0.85em;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.parole-table tbody tr {
    transition: all 0.2s;
}

.parole-table tbody tr:hover {
    background: rgba(0, 217, 255, 0.05);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.2);
}

.lemma-col {
    font-size: 1.15em;
    color: #58a6ff;
    font-weight: 600;
}

.status-badge {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85em;
    font-weight: 600;
}

.status-publish {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.status-draft {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeaa7;
}

.actions {
    display: flex;
    gap: 12px;
}

.btn-icon {
    font-size: 1.3em;
    text-decoration: none;
    cursor: pointer;
    padding: 6px;
    transition: all 0.2s;
    border-radius: 6px;
}

.btn-icon:hover {
    transform: scale(1.15);
    background: rgba(0, 217, 255, 0.2);
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.3);
}

.btn-delete:hover {
    background: rgba(220, 53, 69, 0.1);
}

/* Form Styles */
.form-parola {
    padding: 40px;
}

.form-section {
    margin-bottom: 40px;
    padding: 30px;
    background: #161b22;
    border-radius: 12px;
    border: 1px solid rgba(0, 217, 255, 0.2);
}

.form-section h2 {
    margin-bottom: 25px;
    color: #00d9ff;
    font-size: 1.5em;
    padding-bottom: 10px;
    border-bottom: 3px solid #00d9ff;
    text-shadow: 0 0 15px rgba(0, 217, 255, 0.5);
}

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #e6edf3;
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid rgba(0, 217, 255, 0.3);
    border-radius: 8px;
    font-size: 14px;
    font-family: inherit;
    transition: border-color 0.3s;
    background: #0d1117;
    color: #c9d1d9;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    outline: none;
    border-color: #00d9ff;
    box-shadow: 0 0 15px rgba(0, 217, 255, 0.3);
}

.form-group textarea {
    resize: vertical;
    min-height: 80px;
}

.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
}

.repeater-item {
    background: #0d1117;
    padding: 20px;
    border-radius: 8px;
    margin-bottom: 15px;
    border-left: 4px solid #00d9ff;
    position: relative;
    box-shadow: 0 0 10px rgba(0, 217, 255, 0.1);
}

.repeater-item:hover {
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.btn-remove {
    background: #dc3545;
    color: white;
    border: none;
    padding: 8px 15px;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    margin-top: 10px;
    transition: background 0.3s;
}

.btn-remove:hover {
    background: #c82333;
}

.form-actions {
    display: flex;
    gap: 15px;
    padding: 30px;
    background: #161b22;
    border-radius: 12px;
    margin-top: 30px;
    border: 1px solid rgba(0, 217, 255, 0.2);
}

.alert {
    padding: 20px;
    margin: 30px 40px;
    border-radius: 8px;
    font-weight: 500;
}

.alert-error {
    background: rgba(206, 43, 55, 0.15);
    color: #ff7b72;
    border-left: 4px solid #ce2b37;
    box-shadow: 0 0 15px rgba(206, 43, 55, 0.2);
}

.alert-success {
    background: rgba(0, 146, 70, 0.15);
    color: #7ee787;
    border-left: 4px solid #009246;
    box-shadow: 0 0 15px rgba(0, 146, 70, 0.2);
}

/* Pagination */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 20px;
    padding: 40px 50px;
    background: #0d1117;
    border-top: 2px solid rgba(0, 217, 255, 0.2);
}

.pagination-info {
    color: #e6edf3;
    font-size: 1em;
    font-weight: 500;
}

@media (max-width: 768px) {
    .layout-wrapper {
        flex-direction: column;
    }

    .sidebar {
        position: relative;
        width: 100%;
        height: auto;
    }

    .main-content {
        margin-left: 0;
        padding: 10px;
    }

    header {
        padding: 20px;
    }

    header h1 {
        font-size: 1.5em;
    }

    .actions-bar {
        padding: 20px;
        flex-direction: column;
        align-items: stretch;
    }

    .search-form {
        margin-left: 0;
    }

    .parole-table {
        font-size: 0.9em;
    }

    .parole-table th,
    .parole-table td {
        padding: 10px;
    }

    .form-parola {
        padding: 20px;
    }

    .form-section {
        padding: 20px;
    }
}
