:root {
    --primary: #4361ee;
    --secondary: #3f37c9;
    --success: #4cc9f0;
    --warning: #f72585;
    --light: #f8f9fa;
    --dark: #212529;
    --gray: #6c757d;
    --light-gray: #e9ecef;
    --border-radius: 8px;
    --box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fb;
    color: var(--dark);
    line-height: 1.6;
}

.container {
    max-width: 1000px;
    margin: 0 auto;
    padding: 20px;
}

header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
    padding-bottom: 15px;
    border-bottom: 1px solid var(--light-gray);
}

.header-title h1 {
    font-size: 28px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.header-title p {
    color: var(--gray);
    font-size: 14px;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background-color: var(--primary);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
}

.form-container {
    background: white;
    border-radius: var(--border-radius);
    box-shadow: var(--box-shadow);
    overflow: hidden;
    margin-bottom: 30px;
}

.form-header {
    padding: 20px;
    background: linear-gradient(135deg, #4361ee, #3a0ca3);
    color: white;
}

.form-title {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.form-body {
    padding: 30px;
}

.form-section {
    margin-bottom: 30px;
}

.section-title {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--light-gray);
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

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

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
}

.required::after {
    content: " *";
    color: #dc3545;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(67, 97, 238, 0.2);
}

.form-control.error {
    border-color: #dc3545;
}

.form-text {
    font-size: 12px;
    color: var(--gray);
    margin-top: 5px;
}

.form-error {
    font-size: 12px;
    color: #dc3545;
    margin-top: 5px;
    display: none;
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: var(--border-radius);
    cursor: pointer;
    font-size: 14px;
    font-weight: 500;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

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

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

.btn-success {
    background-color: #28a745;
    color: white;
}

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

.btn-light {
    background-color: var(--light-gray);
    color: var(--dark);
}

.btn-light:hover {
    background-color: #dae0e5;
}

.form-footer {
    padding: 20px;
    border-top: 1px solid var(--light-gray);
    display: flex;
    justify-content: flex-end;
    gap: 15px;
}

.icon-selection {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(60px, 1fr));
    gap: 10px;
    margin-top: 10px;
    max-height: 200px;
    overflow-y: auto;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
}

.icon-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 10px;
    border: 1px solid var(--light-gray);
    border-radius: var(--border-radius);
    cursor: pointer;
    transition: var(--transition);
}

.icon-option:hover {
    background-color: #f8f9fa;
    border-color: var(--primary);
}

.icon-option.selected {
    background-color: rgba(67, 97, 238, 0.1);
    border-color: var(--primary);
}

.icon-option i {
    font-size: 20px;
    margin-bottom: 5px;
    color: var(--primary);
}

.icon-option span {
    font-size: 10px;
    text-align: center;
}

.privilege-state-info {
    display: flex;
    gap: 15px;
    margin-top: 10px;
}

.state-item {
    display: flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--gray);
}

.state-indicator {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.state-closed {
    background-color: #28a745;
}

.state-open {
    background-color: #17a2b8;
}

@media (max-width: 768px) {
    .form-row {
        grid-template-columns: 1fr;
    }

    .form-footer {
        flex-direction: column;
    }

    .icon-selection {
        grid-template-columns: repeat(auto-fill, minmax(50px, 1fr));
    }
}