Really-amin's picture
Upload 577 files
b190b45 verified
/**
* Component Library - Cursor-Inspired
* Modern flat design components with subtle depth
* Version: 1.0.0
*/
/* ============================================
BUTTONS - Flat with Hover Lift
============================================ */
.btn {
display: inline-flex;
align-items: center;
justify-content: center;
gap: var(--space-2);
padding: var(--space-2) var(--space-4);
min-height: 36px;
font-family: var(--font-primary);
font-size: var(--text-sm);
font-weight: var(--weight-medium);
line-height: 1;
text-decoration: none;
border: none;
border-radius: var(--radius-md);
cursor: pointer;
transition: transform var(--duration-normal) var(--ease-in-out),
box-shadow var(--duration-normal) var(--ease-in-out),
background var(--duration-normal) var(--ease-in-out),
color var(--duration-normal) var(--ease-in-out);
white-space: nowrap;
user-select: none;
}
.btn:disabled {
opacity: 0.5;
cursor: not-allowed;
pointer-events: none;
}
.btn:active {
transform: scale(0.98);
}
/* Primary Button - Purple Gradient */
.btn-primary {
background: var(--accent-purple-gradient);
color: white;
box-shadow: var(--shadow-sm);
}
.btn-primary:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-purple);
}
/* Secondary Button - Flat Surface */
.btn-secondary {
background: var(--surface-secondary);
color: var(--text-primary);
border: 1px solid var(--border-emphasis);
}
.btn-secondary:hover {
transform: translateY(-2px);
background: var(--surface-hover);
box-shadow: var(--shadow-sm);
}
/* Ghost Button - Transparent */
.btn-ghost {
background: transparent;
color: var(--text-secondary);
border: none;
}
.btn-ghost:hover {
background: rgba(255, 255, 255, 0.05);
color: var(--text-primary);
}
/* Danger Button */
.btn-danger {
background: var(--color-danger);
color: white;
}
.btn-danger:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-danger);
}
/* Success Button */
.btn-success {
background: var(--color-success);
color: white;
}
.btn-success:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-success);
}
/* Button Sizes */
.btn-sm {
padding: var(--space-1) var(--space-3);
min-height: 28px;
font-size: var(--text-xs);
}
.btn-lg {
padding: var(--space-3) var(--space-6);
min-height: 44px;
font-size: var(--text-base);
}
/* Icon Button */
.btn-icon {
width: 36px;
height: 36px;
padding: 0;
min-height: 36px;
}
.btn-icon.btn-sm {
width: 28px;
height: 28px;
min-height: 28px;
}
.btn-icon.btn-lg {
width: 44px;
height: 44px;
min-height: 44px;
}
/* ============================================
CARDS - Flat with Subtle Shadow
============================================ */
.card {
background: var(--surface-primary);
border: 1px solid var(--border-default);
border-radius: var(--radius-lg);
padding: var(--space-6);
box-shadow: var(--shadow-sm);
transition: transform var(--duration-normal) var(--ease-in-out),
box-shadow var(--duration-normal) var(--ease-in-out);
}
.card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.card.no-hover:hover {
transform: none;
box-shadow: var(--shadow-sm);
}
/* Card Header */
.card-header {
display: flex;
align-items: center;
justify-content: space-between;
margin-bottom: var(--space-4);
padding-bottom: var(--space-4);
border-bottom: 1px solid var(--border-default);
}
.card-title {
font-size: var(--text-lg);
font-weight: var(--weight-semibold);
color: var(--text-primary);
margin: 0;
}
.card-subtitle {
font-size: var(--text-sm);
color: var(--text-secondary);
margin-top: var(--space-1);
}
/* Card Body */
.card-body {
margin: 0;
}
/* Card Footer */
.card-footer {
display: flex;
align-items: center;
justify-content: space-between;
margin-top: var(--space-4);
padding-top: var(--space-4);
border-top: 1px solid var(--border-default);
}
/* Stat Card */
.stat-card {
background: var(--surface-primary);
border: 1px solid var(--border-default);
border-radius: var(--radius-lg);
padding: var(--space-5);
box-shadow: var(--shadow-sm);
transition: transform var(--duration-normal) var(--ease-in-out),
box-shadow var(--duration-normal) var(--ease-in-out);
}
.stat-card:hover {
transform: translateY(-2px);
box-shadow: var(--shadow-md);
}
.stat-icon {
width: 40px;
height: 40px;
display: flex;
align-items: center;
justify-content: center;
background: var(--accent-purple);
background: var(--accent-purple-gradient);
border-radius: var(--radius-md);
color: white;
margin-bottom: var(--space-3);
}
.stat-value {
font-size: var(--text-3xl);
font-weight: var(--weight-bold);
color: var(--text-primary);
line-height: 1;
margin-bottom: var(--space-2);
}
.stat-label {
font-size: var(--text-sm);
color: var(--text-secondary);
font-weight: var(--weight-medium);
}
.stat-change {
display: inline-flex;
align-items: center;
gap: var(--space-1);
font-size: var(--text-xs);
font-weight: var(--weight-medium);
margin-top: var(--space-2);
padding: 2px 6px;
border-radius: var(--radius-sm);
}
.stat-change.positive {
color: var(--color-success);
background: var(--color-success-bg);
}
.stat-change.negative {
color: var(--color-danger);
background: var(--color-danger-bg);
}
/* ============================================
INPUTS & FORMS
============================================ */
.input,
.select,
.textarea {
width: 100%;
padding: var(--space-2) var(--space-3);
background: var(--surface-primary);
border: 1px solid var(--border-default);
border-radius: var(--radius-md);
color: var(--text-primary);
font-family: var(--font-primary);
font-size: var(--text-sm);
line-height: var(--leading-normal);
transition: var(--transition-colors);
}
.input:focus,
.select:focus,
.textarea:focus {
outline: none;
border-color: var(--accent-purple);
box-shadow: 0 0 0 3px rgba(139, 92, 246, 0.1);
}
.input::placeholder,
.textarea::placeholder {
color: var(--text-tertiary);
}
.input:disabled,
.select:disabled,
.textarea:disabled {
opacity: 0.5;
cursor: not-allowed;
}
.textarea {
min-height: 100px;
resize: vertical;
}
/* Input Group */
.input-group {
margin-bottom: var(--space-4);
}
.input-label {
display: block;
font-size: var(--text-sm);
font-weight: var(--weight-medium);
color: var(--text-primary);
margin-bottom: var(--space-2);
}
.input-hint {
display: block;
font-size: var(--text-xs);
color: var(--text-tertiary);
margin-top: var(--space-1);
}
.input-error {
display: block;
font-size: var(--text-xs);
color: var(--color-danger);
margin-top: var(--space-1);
}
.input.error {
border-color: var(--color-danger);
}
.input.error:focus {
box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}
/* Checkbox & Radio */
.checkbox,
.radio {
display: flex;
align-items: center;
gap: var(--space-2);
cursor: pointer;
user-select: none;
}
.checkbox input,
.radio input {
width: 18px;
height: 18px;
margin: 0;
cursor: pointer;
accent-color: var(--accent-purple);
}
/* ============================================
TABLES
============================================ */
.table-container {
background: var(--surface-primary);
border: 1px solid var(--border-default);
border-radius: var(--radius-lg);
overflow: hidden;
box-shadow: var(--shadow-sm);
}
.table {
width: 100%;
border-collapse: collapse;
font-size: var(--text-sm);
}
.table thead {
background: var(--surface-secondary);
border-bottom: 1px solid var(--border-default);
}
.table th {
padding: var(--space-3) var(--space-4);
text-align: left;
font-weight: var(--weight-semibold);
color: var(--text-secondary);
font-size: var(--text-xs);
text-transform: uppercase;
letter-spacing: var(--tracking-wider);
}
.table tbody tr {
border-bottom: 1px solid var(--border-subtle);
transition: background var(--duration-fast) var(--ease-out);
}
.table tbody tr:last-child {
border-bottom: none;
}
.table tbody tr:hover {
background: var(--surface-secondary);
}
.table td {
padding: var(--space-3) var(--space-4);
color: var(--text-primary);
}
/* Table Cell Alignment */
.table .text-right {
text-align: right;
}
.table .text-center {
text-align: center;
}
/* ============================================
BADGES & PILLS
============================================ */
.badge {
display: inline-flex;
align-items: center;
gap: var(--space-1);
padding: 2px 8px;
font-size: var(--text-xs);
font-weight: var(--weight-semibold);
line-height: 1;
border-radius: var(--radius-sm);
white-space: nowrap;
}
.badge-primary {
background: var(--accent-purple);
color: white;
}
.badge-secondary {
background: var(--surface-secondary);
color: var(--text-secondary);
border: 1px solid var(--border-emphasis);
}
.badge-success {
background: var(--color-success-bg);
color: var(--color-success);
}
.badge-warning {
background: var(--color-warning-bg);
color: var(--color-warning);
}
.badge-danger {
background: var(--color-danger-bg);
color: var(--color-danger);
}
.badge-info {
background: var(--color-info-bg);
color: var(--color-info);
}
/* Pill (Rounded Badge) */
.pill {
border-radius: var(--radius-full);
}
/* ============================================
ALERTS & NOTIFICATIONS
============================================ */
.alert {
padding: var(--space-4);
border-radius: var(--radius-md);
border-left: 3px solid;
background: var(--surface-primary);
display: flex;
align-items: flex-start;
gap: var(--space-3);
}
.alert-icon {
flex-shrink: 0;
width: 20px;
height: 20px;
}
.alert-content {
flex: 1;
}
.alert-title {
font-weight: var(--weight-semibold);
margin-bottom: var(--space-1);
}
.alert-message {
font-size: var(--text-sm);
line-height: var(--leading-relaxed);
}
.alert-info {
border-left-color: var(--color-info);
background: var(--color-info-bg);
}
.alert-info .alert-icon,
.alert-info .alert-title {
color: var(--color-info);
}
.alert-success {
border-left-color: var(--color-success);
background: var(--color-success-bg);
}
.alert-success .alert-icon,
.alert-success .alert-title {
color: var(--color-success);
}
.alert-warning {
border-left-color: var(--color-warning);
background: var(--color-warning-bg);
}
.alert-warning .alert-icon,
.alert-warning .alert-title {
color: var(--color-warning);
}
.alert-danger {
border-left-color: var(--color-danger);
background: var(--color-danger-bg);
}
.alert-danger .alert-icon,
.alert-danger .alert-title {
color: var(--color-danger);
}
/* ============================================
MODALS
============================================ */
.modal-backdrop {
position: fixed;
inset: 0;
background: rgba(0, 0, 0, 0.6);
backdrop-filter: var(--blur-md);
-webkit-backdrop-filter: var(--blur-md);
display: flex;
align-items: center;
justify-content: center;
z-index: var(--z-modal-backdrop);
padding: var(--space-4);
}
.modal {
background: var(--surface-primary);
border: 1px solid var(--border-emphasis);
border-radius: var(--radius-lg);
box-shadow: var(--shadow-2xl);
max-width: 500px;
width: 100%;
max-height: 90vh;
overflow: hidden;
display: flex;
flex-direction: column;
z-index: var(--z-modal);
}
.modal-header {
padding: var(--space-5);
border-bottom: 1px solid var(--border-default);
display: flex;
align-items: center;
justify-content: space-between;
}
.modal-title {
font-size: var(--text-xl);
font-weight: var(--weight-semibold);
color: var(--text-primary);
margin: 0;
}
.modal-close {
width: 32px;
height: 32px;
display: flex;
align-items: center;
justify-content: center;
background: transparent;
border: none;
border-radius: var(--radius-sm);
color: var(--text-secondary);
cursor: pointer;
transition: var(--transition-colors);
}
.modal-close:hover {
background: var(--surface-secondary);
color: var(--text-primary);
}
.modal-body {
padding: var(--space-5);
overflow-y: auto;
flex: 1;
}
.modal-footer {
padding: var(--space-5);
border-top: 1px solid var(--border-default);
display: flex;
align-items: center;
justify-content: flex-end;
gap: var(--space-3);
}
/* ============================================
TOOLTIPS
============================================ */
.tooltip {
position: absolute;
padding: var(--space-2) var(--space-3);
background: var(--bg-secondary);
border: 1px solid var(--border-emphasis);
border-radius: var(--radius-md);
font-size: var(--text-xs);
color: var(--text-primary);
white-space: nowrap;
box-shadow: var(--shadow-lg);
z-index: var(--z-tooltip);
pointer-events: none;
}
.tooltip::before {
content: '';
position: absolute;
width: 8px;
height: 8px;
background: var(--bg-secondary);
border-left: 1px solid var(--border-emphasis);
border-top: 1px solid var(--border-emphasis);
transform: rotate(45deg);
}
.tooltip.bottom::before {
top: -5px;
left: 50%;
margin-left: -4px;
}
/* ============================================
SKELETON LOADERS
============================================ */
.skeleton {
background: linear-gradient(
90deg,
var(--surface-secondary) 0%,
var(--surface-tertiary) 50%,
var(--surface-secondary) 100%
);
background-size: 200% 100%;
animation: skeleton-loading 1.5s ease-in-out infinite;
border-radius: var(--radius-sm);
}
@keyframes skeleton-loading {
0% {
background-position: 200% 0;
}
100% {
background-position: -200% 0;
}
}
.skeleton-text {
height: 1em;
width: 100%;
}
.skeleton-title {
height: 1.5em;
width: 60%;
}
.skeleton-avatar {
width: 40px;
height: 40px;
border-radius: var(--radius-full);
}
/* ============================================
DIVIDERS
============================================ */
.divider {
height: 1px;
background: var(--border-default);
margin: var(--space-6) 0;
border: none;
}
.divider-vertical {
width: 1px;
height: auto;
background: var(--border-default);
margin: 0 var(--space-4);
align-self: stretch;
}
/* ============================================
PROGRESS BARS
============================================ */
.progress {
width: 100%;
height: 8px;
background: var(--surface-secondary);
border-radius: var(--radius-full);
overflow: hidden;
}
.progress-bar {
height: 100%;
background: var(--accent-purple-gradient);
border-radius: var(--radius-full);
transition: width var(--duration-medium) var(--ease-in-out);
}
.progress-bar.success {
background: var(--color-success);
}
.progress-bar.warning {
background: var(--color-warning);
}
.progress-bar.danger {
background: var(--color-danger);
}
/* ============================================
TABS
============================================ */
.tabs {
display: flex;
gap: var(--space-2);
border-bottom: 1px solid var(--border-default);
margin-bottom: var(--space-6);
}
.tab {
padding: var(--space-3) var(--space-4);
background: transparent;
border: none;
border-bottom: 2px solid transparent;
color: var(--text-secondary);
font-size: var(--text-sm);
font-weight: var(--weight-medium);
cursor: pointer;
transition: var(--transition-colors);
position: relative;
bottom: -1px;
}
.tab:hover {
color: var(--text-primary);
}
.tab.active {
color: var(--accent-purple);
border-bottom-color: var(--accent-purple);
}
/* ============================================
DROPDOWNS
============================================ */
.dropdown {
position: relative;
display: inline-block;
}
.dropdown-menu {
position: absolute;
top: 100%;
left: 0;
margin-top: var(--space-2);
min-width: 200px;
background: var(--surface-primary);
border: 1px solid var(--border-emphasis);
border-radius: var(--radius-md);
box-shadow: var(--shadow-lg);
padding: var(--space-2);
z-index: var(--z-dropdown);
opacity: 0;
visibility: hidden;
transform: translateY(-8px);
transition: opacity var(--duration-fast) var(--ease-out),
transform var(--duration-fast) var(--ease-out),
visibility var(--duration-fast);
}
.dropdown.open .dropdown-menu {
opacity: 1;
visibility: visible;
transform: translateY(0);
}
.dropdown-item {
display: flex;
align-items: center;
gap: var(--space-2);
padding: var(--space-2) var(--space-3);
border-radius: var(--radius-sm);
color: var(--text-primary);
font-size: var(--text-sm);
text-decoration: none;
cursor: pointer;
transition: var(--transition-colors);
}
.dropdown-item:hover {
background: var(--surface-secondary);
}
.dropdown-divider {
height: 1px;
background: var(--border-default);
margin: var(--space-2) 0;
}