* {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: Tahoma, Arial, sans-serif;
    background: #f1f1f1;
    color: #1d2327;
    direction: rtl;
}

a {
    text-decoration: none;
    color: inherit;
}

.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 250px;
    background: #1d2327;
    color: #ffffff;
    padding: 20px 0;
    flex-shrink: 0;
}

.sidebar h3 {
    margin: 0;
    padding: 0 20px 20px;
    font-size: 20px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar ul {
    list-style: none;
    margin: 20px 0 0;
    padding: 0;
}

.sidebar ul li {
    margin: 0;
    padding: 0;
}

.sidebar ul li a {
    display: block;
    padding: 12px 20px;
    color: #c3c4c7;
    transition: all 0.2s ease;
}

.sidebar ul li a:hover {
    background: #2271b1;
    color: #fff;
}

.content {
    flex: 1;
    padding: 30px;
}

.content h1 {
    margin-top: 0;
    margin-bottom: 25px;
    font-size: 28px;
    color: #1d2327;
}

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

.card {
    background: #ffffff;
    border: 1px solid #dcdcde;
    border-radius: 8px;
    padding: 20px;
    box-shadow: 0 1px 2px rgba(0,0,0,0.04);
}

.card h3 {
    margin: 0 0 15px;
    font-size: 16px;
    color: #646970;
}

.card p {
    margin: 0;
    font-size: 30px;
    font-weight: bold;
    color: #2271b1;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border: 1px solid #dcdcde;
}

table th,
table td {
    padding: 12px;
    border: 1px solid #dcdcde;
    text-align: right;
}

table th {
    background: #f6f7f7;
    font-weight: bold;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
select,
textarea {
    width: 100%;
    padding: 10px 12px;
    border: 1px solid #8c8f94;
    border-radius: 4px;
    background: #fff;
    font-size: 14px;
}

button,
.btn {
    display: inline-block;
    padding: 10px 16px;
    border: none;
    border-radius: 4px;
    background: #2271b1;
    color: #fff;
    cursor: pointer;
    font-size: 14px;
}

button:hover,
.btn:hover {
    background: #135e96;
}

.alert {
    padding: 12px 14px;
    border-radius: 5px;
    margin-bottom: 15px;
}

.alert-success {
    background: #edfaef;
    color: #0f5132;
    border: 1px solid #badbcc;
}

.alert-error {
    background: #fbeaea;
    color: #842029;
    border: 1px solid #f5c2c7;
}

.login-page {
    min-height: 100vh;
    display: flex;
    justify-content: center;
    align-items: center;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: #fff;
    padding: 25px;
    border: 1px solid #dcdcde;
    border-radius: 8px;
}

.login-box h1 {
    margin-top: 0;
    margin-bottom: 20px;
    text-align: center;
}

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

    .sidebar {
        width: 100%;
    }

    .content {
        padding: 20px;
    }

    .cards {
        grid-template-columns: 1fr;
    }
}
* {
    box-sizing: border-box;
}

body {
    margin: 0;
    font-family: Tahoma, Arial, sans-serif;
    background: #f0f2f5;
    color: #1d2327;
    direction: rtl;
}

a {
    color: inherit;
    text-decoration: none;
}

.topbar {
    height: 56px;
    background: #1d2327;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    font-size: 18px;
    font-weight: bold;
}

.top-user {
    font-size: 13px;
}

.top-user a {
    color: #72aee6;
}

.layout {
    display: flex;
    min-height: calc(100vh - 56px);
}

.sidebar {
    width: 230px;
    background: #2c3338;
    color: #c3c4c7;
    padding: 16px 0;
}

.sidebar a {
    display: block;
    padding: 13px 22px;
    border-right: 4px solid transparent;
    font-size: 14px;
}

.sidebar a:hover,
.sidebar a.active {
    background: #1d2327;
    color: #fff;
    border-right-color: #72aee6;
}

.content {
    flex: 1;
    padding: 28px;
}

h1 {
    margin-top: 0;
    font-size: 26px;
}

h2 {
    margin-top: 0;
    font-size: 18px;
}

.panel {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    padding: 22px;
    margin-bottom: 22px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.03);
}

.cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 18px;
    margin-bottom: 22px;
}

.card {
    background: #fff;
    border: 1px solid #dcdcde;
    border-radius: 12px;
    padding: 20px;
}

.card h3 {
    margin: 0 0 14px;
    color: #50575e;
    font-size: 15px;
}

.card strong {
    font-size: 30px;
    color: #2271b1;
}

input,
select,
button {
    font-family: inherit;
}

input,
select {
    width: 100%;
    border: 1px solid #c3c4c7;
    border-radius: 8px;
    padding: 10px 12px;
    background: #fff;
    outline: none;
}

input:focus,
select:focus {
    border-color: #2271b1;
    box-shadow: 0 0 0 2px rgba(34,113,177,0.15);
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: bold;
}

.form-row {
    margin-bottom: 16px;
}

.btn {
    display: inline-block;
    border: none;
    border-radius: 8px;
    padding: 9px 15px;
    background: #f6f7f7;
    border: 1px solid #c3c4c7;
    color: #1d2327;
    cursor: pointer;
    font-size: 13px;
    text-align: center;
}

.btn:hover {
    opacity: 0.9;
}

.btn.primary {
    background: #2271b1;
    color: #fff;
    border-color: #2271b1;
}

.btn.success {
    background: #00a32a;
    color: #fff;
    border-color: #00a32a;
}

.btn.danger {
    background: #d63638;
    color: #fff;
    border-color: #d63638;
}

.btn.small {
    padding: 6px 10px;
    font-size: 12px;
}

.btn.full {
    width: 100%;
}

.alert {
    padding: 12px 16px;
    border-radius: 8px;
    margin: 12px 0;
    font-size: 14px;
}

.alert.success {
    background: #edfaef;
    color: #007017;
    border: 1px solid #b8e6c1;
}

.alert.danger {
    background: #fcf0f1;
    color: #b32d2e;
    border: 1px solid #f1b8bb;
}

.alert.info {
    background: #eef6fc;
    color: #135e96;
    border: 1px solid #b8d9ef;
}

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

table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
}

th,
td {
    border-bottom: 1px solid #dcdcde;
    padding: 12px;
    text-align: right;
    vertical-align: middle;
    font-size: 13px;
}

th {
    background: #f6f7f7;
    font-weight: bold;
}

.actions {
    white-space: nowrap;
}

.actions .btn {
    margin-left: 4px;
}

.dropzone {
    border: 2px dashed #72aee6;
    border-radius: 14px;
    background: #f6fbff;
    min-height: 170px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    color: #135e96;
    cursor: pointer;
    transition: 0.2s;
}

.dropzone strong {
    font-size: 18px;
    margin-bottom: 8px;
}

.dropzone span {
    font-size: 13px;
}

.dropzone.dragover {
    background: #dff1ff;
    transform: scale(1.01);
}

.inline-form {
    display: flex;
    gap: 8px;
    align-items: center;
}

.inline-form input {
    max-width: 320px;
}

.grid-form {
    display: grid;
    grid-template-columns: 1fr 1fr 160px auto;
    gap: 10px;
}

.share-input {
    min-width: 330px;
    direction: ltr;
    text-align: left;
}

.login-body {
    min-height: 100vh;
    background: linear-gradient(135deg, #1d2327, #2271b1);
    display: flex;
    align-items: center;
    justify-content: center;
}

.login-box {
    width: 390px;
    background: #fff;
    border-radius: 16px;
    padding: 28px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.25);
}

.login-box h1 {
    text-align: center;
    margin-bottom: 24px;
}

.login-box label {
    margin-top: 14px;
}

.login-box button {
    margin-top: 18px;
}

.login-help {
    text-align: center;
    margin-top: 18px;
    color: #646970;
    font-size: 12px;
}

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

    .sidebar {
        width: 100%;
        display: flex;
        overflow-x: auto;
        padding: 0;
    }

    .sidebar a {
        white-space: nowrap;
        border-right: none;
        border-bottom: 3px solid transparent;
    }

    .content {
        padding: 16px;
    }

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

    .inline-form {
        flex-direction: column;
        align-items: stretch;
    }

    .inline-form input {
        max-width: none;
    }
}
